Skip to content

ReadableStream async iteration #319

Closed
@MattiasBuelens

Description

@MattiasBuelens

WebKittens

@annevk

Title of the spec

ReadableStream async iteration

URL to the spec

https://streams.spec.whatwg.org/#rs-asynciterator

URL to the spec's repository

https://github.com/whatwg/streams

Issue Tracker URL

No response

Explainer URL

whatwg/streams#1306

TAG Design Review URL

No response

Mozilla standards-positions issue URL

No response

WebKit Bugzilla URL

https://bugs.webkit.org/show_bug.cgi?id=194379

Radar URL

rdar://problem/96318671

Description

This change to the Streams standard adds support for the async iterable protocol to the ReadableStream API, enabling readable streams to be used as the source of for await...of loops.

Spec change landed in whatwg/streams#980 and whatwg/streams#1035. (Yes, this spec change is already four years old. We forgot to ask for an official position from WebKit back then, so the second best time is now. 😅)

WPT tests are in streams/readable-streams/async-iterator.any.js.

Firefox has shipped this in 2023 in version 110 (see caniuse), and Chrome is currently implementing this (see feature on ChromeStatus).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions