Clarify that the buffer is transferred by ReadableStreamBYOBReader.read() #39034
Labels
closed: question
A user misinterpretation or support question. No action required.
Content:WebAPI
Web API docs
MDN URL
https://developer.mozilla.org/en-US/docs/Web/API/ReadableStreamBYOBReader/read
What specific section or headline is this issue about?
Not entirely sure, maybe the top section
What information was incorrect, unhelpful, or incomplete?
There is no mention that the passed
ArrayBuffer
will be transferred.What did you expect to see?
The page should probably clarify that the
ArrayBuffer
passed along the view will get transferred by the call toread()
, making it unavailable until the actual read operation returns, where it can be gotten back fromvalue.buffer
as is being done in the example section.I must admit I'm not sure how it should be presented though, hence this issue rather than a PR.
Do you have any supporting links, references, or citations?
If you follow the path from https://streams.spec.whatwg.org/#byob-reader-read, you end up at https://streams.spec.whatwg.org/#readable-byte-stream-controller-pull-into where step 10 will transfer the
ArrayBuffer
.Do you have anything more you want to share?
No response
MDN metadata
Page report details
en-us/web/api/readablestreambyobreader/read
The text was updated successfully, but these errors were encountered: