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