Use async_sequence in ReadableStream.from#1372
Open
MattiasBuelens wants to merge 12 commits intowhatwg:mainfrom
Open
Use async_sequence in ReadableStream.from#1372MattiasBuelens wants to merge 12 commits intowhatwg:mainfrom
async_sequence in ReadableStream.from#1372MattiasBuelens wants to merge 12 commits intowhatwg:mainfrom
Conversation
Collaborator
Author
|
The spec text doesn't build yet, because I'm waiting for a new release of Bikeshed that includes speced/bikeshed#3297. You can already build it locally by manually updating the pipx install bikeshed
pipx inject bikeshed --force widlparser==1.5.0
make local |
d78c683 to
c7762c2
Compare
MattiasBuelens
commented
May 1, 2026
| their constructor steps. | ||
|
|
||
| <div algorithm="create a ReadableStream from an async sequence"> | ||
| To <dfn export lt="create from async sequence|create from an async sequence" for="ReadableStream">create</dfn> |
Collaborator
Author
There was a problem hiding this comment.
@lucacasonato Would this work for whatwg/fetch#1291?
c7762c2 to
68ae88a
Compare
8bb3507 to
68ae88a
Compare
68ae88a to
7511a41
Compare
68ae88a to
5ca9d87
Compare
Collaborator
Author
|
CI is (finally) green. Turns out Bikeshed needed to be updated across quite a few tools and services. 😅 Does Chromium and/or Gecko support this change? @ricea perhaps? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replace our manual async iterator logic with the new Web IDL
async_sequence<T>type and its associated operations (added in whatwg/webidl#1397).This comes with one behavioral change:
ReadableStream.from("abc")used to iterate over the Unicode code points of the string (perString.prototype[Symbol.iterator]), but this will now throw aTypeErrorinstead. This is covered by the new WPTs.Developers who want to create a
ReadableStreamfrom a string should update their code to either:ReadableStream.from(["abc"])for a stream with a single chunk"abc"ReadableStream.from([..."abc"])for a stream with three chunks"a","b","c"Supersedes #1310. (Thanks to @lucacasonato for getting this started!)
async_sequenceinReadableStream.from#1372 (review)ReadableStream.fromweb-platform-tests/wpt#59594(See WHATWG Working Mode: Changes for more details.)
Preview | Diff