Skip to content

Narrow ReadableStreamBYOBRequest.view to Uint8Array#43934

Merged
hamishwillee merged 1 commit into
mdn:mainfrom
MattiasBuelens:readablestreambyobrequest-view-uint8array
Apr 26, 2026
Merged

Narrow ReadableStreamBYOBRequest.view to Uint8Array#43934
hamishwillee merged 1 commit into
mdn:mainfrom
MattiasBuelens:readablestreambyobrequest-view-uint8array

Conversation

@MattiasBuelens

Copy link
Copy Markdown
Contributor

Description

The Streams specification has been updated to clarify that ReadableStreamBYOBRequest.view always returns a Uint8Array typed array.

Motivation

By making the type of view more precise, readers can be confident that they don't need to check for other kinds of typed arrays when they make use of this API in their code.

Additional details

The specification change is in whatwg/streams#1367. All supporting browsers and runtimes already implement this correctly today.

@MattiasBuelens
MattiasBuelens requested a review from a team as a code owner April 25, 2026 13:07
@MattiasBuelens
MattiasBuelens requested review from hamishwillee and removed request for a team April 25, 2026 13:07
@github-actions github-actions Bot added Content:WebAPI Web API docs size/xs [PR only] 0-5 LoC changed labels Apr 25, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Preview URLs (1 page)

@hamishwillee hamishwillee left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given that all user agents do this already and so there is no user-facing change, this make sense. Thanks for sorting out @MattiasBuelens . I did a quick check and I don't see anywhere else in the stream docs where an update to comment on this is useful.

@hamishwillee
hamishwillee merged commit ca056fd into mdn:main Apr 26, 2026
8 checks passed
@MattiasBuelens
MattiasBuelens deleted the readablestreambyobrequest-view-uint8array branch April 27, 2026 03:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Content:WebAPI Web API docs size/xs [PR only] 0-5 LoC changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants