Intent to Implement and Ship: ReadableStreamBYOBReader Min Option

148 views
Skip to first unread message

Sneha Agarwal

unread,
Jun 12, 2025, 12:27:32 PMJun 12
to blin...@chromium.org

Contact emails

Explainer

None

Specification

Summary

This feature introduces a min option to the existing ReadableStreamBYOBReader.read(view) API. The API already accepts a ArrayBufferView into which data is read, but currently does not guarantee how many elements will be written before the read resolves. The min option is an additive, opt-in enhancement - it does not affect existing behavior for applications that don’t use it. By specifying a min value, developers can require that the stream wait until at least that many elements are available before resolving the read. This improves upon the current behavior, where reads may resolve with fewer elements than the view can hold.



Blink component

Search tags

TAG review

None

TAG review status

Not applicable

Risks



Interoperability and Compatibility

None



Gecko: Positive (
https://bugzilla.mozilla.org/show_bug.cgi?id=1864406) Feature shipped in 134

WebKit: No signal

Web developers: Positive Developers requested this feature in Chromium
https://issues.chromium.org/issues/40942083 , https://issues.chromium.org/issues/383158935

Other signals: None

WebView application risks

Does this intent deprecate or change behavior of existing APIs, such that it has potentially high risk for Android WebView-based applications?

None



Debuggability

None



Will this feature be supported on all six Blink platforms (Windows, Mac, Linux, ChromeOS, Android, and Android WebView)?

Yes

Is this feature fully tested by web-platform-tests?

Yes

Flag name on about://flags

N/A

Finch feature name

ReadableStreamBYOBReaderReadMinOption

Rollout plan

Will ship enabled for all users

Requires code in //chrome?

False

Tracking bug

Estimated milestones

Shipping on desktop
140
Shipping on Android
140
Shipping on WebView
140


Anticipated spec changes

Open questions about a feature may be a source of future web compat or interop issues. Please list open issues (e.g. links to known github issues in the project for the feature specification) whose resolution may introduce web compat/interop risk (e.g., changing to naming or structure of the API in a non-backward-compatible way).

None

Link to entry on the Chrome Platform Status

This intent message was generated by Chrome Platform Status.


Domenic Denicola

unread,
Jun 12, 2025, 9:54:17 PMJun 12
to blink-dev, Sneha Agarwal
LGTM1

On Friday, June 13, 2025 at 1:27:32 AM UTC+9 Sneha Agarwal wrote:
Contact emails Explainer
None

Note that the feature is somewhat documented at https://developer.mozilla.org/en-US/docs/Web/API/ReadableStreamBYOBReader/read . A more detailed explainer with alternatives considered, etc., would have been nice, but I don't think making you write one as the second implementer is necessary.

For those interested, the spec PR which added this contains some discussion and links to relevant issues, especially this one. There's a lot of specification details discussion mixed in as well, but people can find the design discussion too.
 


Specification Summary

This feature introduces a min option to the existing ReadableStreamBYOBReader.read(view) API. The API already accepts a ArrayBufferView into which data is read, but currently does not guarantee how many elements will be written before the read resolves. The min option is an additive, opt-in enhancement - it does not affect existing behavior for applications that don’t use it. By specifying a min value, developers can require that the stream wait until at least that many elements are available before resolving the read. This improves upon the current behavior, where reads may resolve with fewer elements than the view can hold.



Blink component Search tags TAG review
None

TAG review status
Not applicable

Risks


Interoperability and Compatibility

None



Gecko: Positive (
https://bugzilla.mozilla.org/show_bug.cgi?id=1864406) Feature shipped in 134

WebKit: No signal

Note that while "No signal" is the correct way of filling out this field, since there's no official standards position, we have a public statement on the spec PR that "WebKit supports this addition". Combined with the WebKit bug on file for implementing this, I think it is reasonable to approve this without requiring a formal standards position.

Mike Taylor

unread,
Jun 18, 2025, 11:11:01 AMJun 18
to Domenic Denicola, blink-dev, Sneha Agarwal

LGTM2

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/1ed24046-808f-4d53-97c0-e95d2a7befb7n%40chromium.org.

Daniel Bratell

unread,
Jun 18, 2025, 11:12:20 AMJun 18
to Mike Taylor, Domenic Denicola, blink-dev, Sneha Agarwal

LGTM3

If you can improve the documentation, that would be appreciated but it's not blocking anything.

/Daniel

Sneha Agarwal

unread,
Jul 2, 2025, 3:11:03 PM (9 days ago) Jul 2
to blink-dev, Daniel Bratell, Sneha Agarwal, Mike Taylor, Domenic Denicola
Hi Daniel,

I’ve updated the MDN Doc.  – specifically, in the Browser compatibility section, the options.min parameter is now marked as supported starting in Chrome 140.
Please let me know if there’s any other part of the documentation you’d suggest improving, or if there’s anything else I should add.

Thanks.
Reply all
Reply to author
Forward
0 new messages