-
Notifications
You must be signed in to change notification settings - Fork 38
MDN Docs: Async Iteration #132
Description
Creating MDN documentation for the Async Iteration proposal
Adapted from Florian Scholz's notes.
Iteration protocol reference page:
- https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols needs to talk about the async iteration protocol.
Symbol.asyncIterator
Note: Docs could probably be derived from Symbol.iterator https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol/iterator. It's already listed on the Symbol page: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol#Well-known_symbols
-
New page to be created here: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol/asyncIterator
-
Compat data update here: https://github.com/mdn/browser-compat-data/blob/master/javascript/builtins/Symbol.json#L58
-
⏳New interactive example here: https://github.com/mdn/interactive-examples/tree/master/live-examples/js-examples/symbol (PR submitted here)
for-await-of
-
Needs to be listed here: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements#Iterations
-
New reference page here: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for-await...of
-
New compat data entry here: https://github.com/mdn/browser-compat-data/blob/master/javascript/statements.json
-
⏳ New interactive example here: https://github.com/mdn/interactive-examples/tree/master/live-examples/js-examples/statement (PR submitted here)
Async generators
-
⏳Additional
async function*reference page: (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/async_generator_function?) (Issue opened here) -
Compat data (already completed here)
-
Interactive example (already completed here)
APIs that use async iterators / generators
- Identify other APIs that use async iteration.
Guide page updates
We have https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Iterators_and_generators
Unfortunately we have no dedicated guide page yet on async JS programming. We want to create that at some point, though. See https://bugzilla.mozilla.org/show_bug.cgi?id=1305261
More brainstorming on that here: https://docs.google.com/document/d/1ko8Xt5JaFVuXjEOHSyhw8MaxKPTbKiX6Qc7EXtczKUA/edit?ts=5b55b98b#heading=h.5tv0p4d6vqmu