@@ -3990,8 +3990,15 @@ If a single type parameter is given, then the interface has a
3990
3990
values of the specified type.
3991
3991
If two type parameters are given, then the interface has a
3992
3992
<dfn id="dfn-pair-iterator" export>pair iterator</dfn> and provides
3993
- value pairs, where the first value is a key and the second is the
3994
- value associated with the key.
3993
+ [=value pairs=] with the given types.
3994
+
3995
+ A <dfn>value pair</dfn>, given a key type and a value type, is a [=/struct=] with two
3996
+ [=struct/items=]:
3997
+ 1. an [=struct/item=] whose [=struct/name=] is "key", which is referred to as the [=value pair=]'s
3998
+ <dfn for="value pair">key</dfn>, and whose value is an IDL value of the key type;
3999
+ 1. an [=struct/item=] whose [=struct/name=] is "value", which is referred to as the
4000
+ [=value pair=]'s <dfn for="value pair">value</dfn>, and whose value is an IDL value of the
4001
+ value type.
3995
4002
3996
4003
A [=value iterator=]
3997
4004
must only be declared on an interface
@@ -4005,11 +4012,10 @@ defined to iterate over the object’s indexed properties.
4005
4012
A [=pair iterator=]
4006
4013
must not be declared on an interface
4007
4014
that [=support indexed properties|supports indexed properties=].
4008
- Prose accompanying an interface with a
4009
- [=pair iterator=]
4010
- must define what the list of
4011
- <dfn id="dfn-value-pairs-to-iterate-over" export>value pairs to iterate over</dfn>
4012
- is.
4015
+
4016
+ Prose accompanying an [=interface=] with a [=pair iterator=] must define a [=/list=] of
4017
+ [=value pairs=] for each instance of the [=interface=], which is the list of
4018
+ <dfn id="dfn-value-pairs-to-iterate-over" export>value pairs to iterate over</dfn>.
4013
4019
4014
4020
<div class="note">
4015
4021
@@ -4070,8 +4076,9 @@ that have [=members=] with these names.
4070
4076
4071
4077
<blockquote>
4072
4078
4073
- The [=value pairs to iterate over=] are the list of key-value pairs with the key being the username and the
4074
- value being the open <code class="idl">Session</code> object on the <code class="idl">SessionManager</code>
4079
+ The [=value pairs to iterate over=] are the list of [=value pairs=] with the
4080
+ [=value pair/key=] being the username and the [=value pair/value=] being the open
4081
+ <code class="idl">Session</code> object on the <code class="idl">SessionManager</code>
4075
4082
object corresponding to that username, sorted by username.
4076
4083
4077
4084
</blockquote>
@@ -11576,8 +11583,8 @@ then the [=function object=] is {{%ArrayProto_forEach%}}.
11576
11583
1. Let |i| be 0.
11577
11584
1. While |i| is less than the length of |pairs|:
11578
11585
1. Let |pair| be the entry in |pairs| at index |i|.
11579
- 1. Let |key| be |pair|’s key.
11580
- 1. Let |value| be |pair|’s value.
11586
+ 1. Let |key| be |pair|’s [=value pair/ key=] .
11587
+ 1. Let |value| be |pair|’s [= value pair/value=] .
11581
11588
1. [=Invoke=] |callback| with |thisArg|
11582
11589
(or <emu-val>undefined</emu-val>, if the argument was not supplied)
11583
11590
as the [=callback this value=] and |value|, |key| and <b>this</b> as its arguments.
@@ -11784,22 +11791,22 @@ The \[[Prototype]] [=internal slot=] of an [=iterator prototype object=]
11784
11791
must be {{%IteratorPrototype%}}.
11785
11792
11786
11793
<div algorithm>
11787
- The <dfn>iterator result</dfn> for a pair of IDL values |pair| and a kind |kind| is given by the
11794
+ The <dfn>iterator result</dfn> for a [=value pair=] |pair| and a kind |kind| is given by the
11788
11795
following steps:
11789
11796
11790
11797
1. Let |result| be a value determined by the value of |kind|:
11791
11798
<dl class="switch">
11792
11799
: "<code>key</code>"
11793
- :: 1. Let |idlKey| be |pair|’s key.
11800
+ :: 1. Let |idlKey| be |pair|’s [=value pair/ key=] .
11794
11801
1. Let |key| be the result of [=converted to an ECMAScript value|converting=] |idlKey| to an ECMAScript value.
11795
11802
1. |result| is |key|.
11796
11803
: "<code>value</code>"
11797
- :: 1. Let |idlValue| be |pair|’s value.
11804
+ :: 1. Let |idlValue| be |pair|’s [= value pair/value=] .
11798
11805
1. Let |value| be the result of [=converted to an ECMAScript value|converting=] |idlValue| to an ECMAScript value.
11799
11806
1. |result| is |value|.
11800
11807
: "<code>key+value</code>"
11801
- :: 1. Let |idlKey| be |pair|’s key.
11802
- 1. Let |idlValue| be |pair|’s value.
11808
+ :: 1. Let |idlKey| be |pair|’s [=value pair/ key=] .
11809
+ 1. Let |idlValue| be |pair|’s [= value pair/value=] .
11803
11810
1. Let |key| be the result of [=converted to an ECMAScript value|converting=] |idlKey| to an ECMAScript value.
11804
11811
1. Let |value| be the result of [=converted to an ECMAScript value|converting=] |idlValue| to an ECMAScript value.
11805
11812
1. Let |array| be the result of performing [$ArrayCreate$](2).
0 commit comments