Open Bug 2052661 Opened 1 month ago Updated 1 month ago

Streams: use Web IDL `async_sequence` in `ReadableStream.from`

Categories

(Core :: DOM: Streams, enhancement)

enhancement

Tracking

()

UNCONFIRMED

People

(Reporter: mattias, Unassigned)

References

(Depends on 1 open bug, )

Details

We are updating the Streams specification to use Web IDL's async_sequence<T> type for the input of ReadableStream.from(). The new IDL is:

interface ReadableStream {
  static ReadableStream from(async_sequence<any> asyncIterable);
}

This comes with one behavioral change: ReadableStream.from("abc") used to iterate over the Unicode code points of the string (per String.prototype[Symbol.iterator]), but this will now throw a TypeError instead. The WPT tests have been updated to reflect this.

Specification change: https://github.com/whatwg/streams/pull/1372
Tests: https://github.com/web-platform-tests/wpt/pull/59594
Depends on https://bugzilla.mozilla.org/show_bug.cgi?id=1911295

Blocks: 2049130
You need to log in before you can comment on or make changes to this bug.