- From: Kagami Sascha Rosylight <notifications@github.com>
- Date: Tue, 01 Feb 2022 04:37:30 -0800
- To: whatwg/webidl <webidl@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Tuesday, 1 February 2022 12:37:42 UTC
The Streams spec has [the following dictionary](https://streams.spec.whatwg.org/#dictdef-readablestreambyobreadresult):
```webidl
dictionary ReadableStreamBYOBReadResult {
  ArrayBufferView value;
  boolean done;
};
```
Here, `value` can be an ArrayBufferView or undefined per the relevant algorithms:
* https://streams.spec.whatwg.org/#byob-reader-read, "given chunk" in "close steps"
* Where the "chunk" can be undefined https://streams.spec.whatwg.org/#read-into-request-close-steps
And there's relevant WPT tests that checks the existence of `value` field even when it's `undefined`. https://github.com/web-platform-tests/wpt/blob/62c22e4362e19418022e03ca4f5bea76b998fa3f/streams/readable-byte-streams/tee.any.js#L503
And here's my question: does the IDL spec allows an `undefined` field as a result of IDL->JS conversion? And if it does, should it?
-- 
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/webidl/issues/1094
You are receiving this because you are subscribed to this thread.
Message ID: <whatwg/webidl/issues/1094@github.com>
Received on Tuesday, 1 February 2022 12:37:42 UTC