@@ -4287,7 +4287,7 @@ An [=interface=] can be declared to be asynchronously iterable by using an
4287
4287
(matching <emu-nt><a href="#prod-AsyncIterable">AsyncIterable</a></emu-nt>) in the body of the
4288
4288
[=interface=].
4289
4289
4290
- <pre class="syntax">
4290
+ <pre highlight="webidl" class="syntax">
4291
4291
interface interface_identifier {
4292
4292
async iterable<key_type, value_type>;
4293
4293
};
@@ -4301,7 +4301,7 @@ Note: In the ECMAScript language binding, an interface that is asynchronously it
4301
4301
and {{@@asyncIterator}} properties on its [=interface prototype object=].
4302
4302
4303
4303
Prose accompanying an [=interface=] with an [=asynchronously iterable declaration=] must define a
4304
- <dfn id="dfn-get-the-next-iteration-result">get the next iteration result</dfn> algorithm.
4304
+ <dfn id="dfn-get-the-next-iteration-result" export >get the next iteration result</dfn> algorithm.
4305
4305
This algorithm receives the instance of the [=interface=] that is being iterated, as well as the
4306
4306
async iterator itself (which can be useful for storing state).
4307
4307
It must return a {{Promise}} that either rejects, resolves with undefined to signal the end of the
@@ -4310,9 +4310,9 @@ iteration, or resolves with a tuple containing two elements:
4310
4310
1. a value of the first type given in the declaration;
4311
4311
1. a value of the second type given in the declaration.
4312
4312
4313
- The prose may also define <dfn>asynchronous iterator initialization steps</dfn> for the
4314
- [=interface=] with an [=asynchronously iterable declaration=], which would then be called with the
4315
- instance of the [=interface=] being iterated, as well as the newly created iterator object.
4313
+ The prose may also define <dfn export >asynchronous iterator initialization steps</dfn>. These
4314
+ receive the instance of the [=interface=] being iterated, as well as the newly-created
4315
+ iterator object.
4316
4316
4317
4317
[=Interfaces=] with an [=asynchronously iterable declaration=] must not have any
4318
4318
[=interface members=] named "<code>entries</code>", "<code>keys</code>", or "<code>values</code>",
@@ -4323,7 +4323,7 @@ or have any [=inherited interfaces=] that have [=interface members=] with these
4323
4323
Consider the following interface <code class="idl">SessionManager</code>, which allows access
4324
4324
to a number of <code class="idl">Session</code> objects keyed by username:
4325
4325
4326
- <pre>
4326
+ <pre highlight="webidl" >
4327
4327
[Exposed=Window]
4328
4328
interface SessionManager {
4329
4329
Session getSessionForUser(DOMString username);
@@ -12552,7 +12552,6 @@ The \[[Prototype]] [=internal slot=] of an [=asynchronous iterator prototype obj
12552
12552
1. Return |thisValidationPromiseCapability|.\[[Promise]].
12553
12553
12554
12554
1. If |object| is not a [=default asynchronous iterator object=] for |interface|, then:
12555
- 1. Issue: [=Realm=] check?
12556
12555
1. Let |error| be a new {{ECMAScript/TypeError}}.
12557
12556
1. Perform [=!=] [$Call$](|thisValidationPromiseCapability|.\[[Reject]],
12558
12557
<emu-val>undefined</emu-val>, « |error| »).
@@ -12570,21 +12569,16 @@ The \[[Prototype]] [=internal slot=] of an [=asynchronous iterator prototype obj
12570
12569
1. Let |nextPromise| be the result of
12571
12570
[=get the next iteration result|getting the next iteration result=] with |object|'s
12572
12571
[=default asynchronous iterator object/target=] and |object|.
12573
- 1. Let |resolveSteps | be the following steps, given |next|:
12572
+ 1. Let |fulfillSteps | be the following steps, given |next|:
12574
12573
1. Set |object|'s [=default asynchronous iterator object/ongoing promise=] to
12575
12574
undefined.
12576
12575
1. If |next| is undefined, then:
12577
12576
1. Set |object|'s [=default asynchronous iterator object/is finished=] to true.
12578
- 1. Let |result| be [$CreateIterResultObject$](<emu-val>undefined</emu-val>,
12577
+ 1. Return [=!=] [$CreateIterResultObject$](<emu-val>undefined</emu-val>,
12579
12578
<emu-val>true</emu-val>).
12580
- 1. Perform [=!=] [$Call$](|nextPromiseCapability|.\[[Resolve]],
12581
- <emu-val>undefined</emu-val>, « |result| »).
12582
12579
1. Otherwise:
12583
- 1. Let (|key|, |value|) be |next|.
12584
- 1. Let |result| be the [=iterator result=] for (|key|, |value|) and |kind|.
12585
- 1. Perform [=!=] [$Call$](|nextPromiseCapability|.\[[Resolve]],
12586
- <emu-val>undefined</emu-val>, « |result| »).
12587
- 1. Let |onFulfilled| be [=!=] [$CreateBuiltinFunction$](|resolveSteps|, « »).
12580
+ 1. Return the [=iterator result=] for |next| and |kind|.
12581
+ 1. Let |onFulfilled| be [=!=] [$CreateBuiltinFunction$](|fulfillSteps|, « »).
12588
12582
1. Perform [=!=] [$PerformPromiseThen$](|nextPromise|, |onFulfilled|,
12589
12583
<emu-val>undefined</emu-val>, |nextPromiseCapability|).
12590
12584
1. Return |nextPromiseCapability|.\[[Promise]].
0 commit comments