Re: [whatwg/streams] Tracking issue for Web IDL async iterator support (#1017)

@Jack-Works The async iterator is defined on `ReadableStream` itself (instead of `ReadableStreamDefaultReader`), so you should expect to see `ReadableStream.prototype[Symbol.asyncIterator]`. (Note that the specification does not define the `Symbol.asyncIterator` method itself, instead it uses an `async iterable` declaration in [its Web IDL](https://streams.spec.whatwg.org/#readablestream). The actual `Symbol.asyncIterator` method is [defined by Web IDL](https://heycam.github.io/webidl/#es-asynchronous-iterable), which internally uses [the steps from the "async iteration" section](https://streams.spec.whatwg.org/#rs-asynciterator) to create and advance the iterator.)

That said, the async iterator feature is fairly new and is not yet implemented in any browser. If you want to use it today, you're probably going to need [a polyfill](https://github.com/MattiasBuelens/web-streams-polyfill/) (shameless plug! 😁).

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/streams/issues/1017#issuecomment-696602229

Received on Tuesday, 22 September 2020 09:12:41 UTC