Skip to content

Streams: use Web IDL async_sequence in ReadableStream.from #64288

Description

@MattiasBuelens

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: whatwg/streams#1372
Tests: web-platform-tests/wpt#59594

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions