Skip to content

Commit 1ce5eb5

Browse files
authored
Update @@foo symbol notation to %Symbol.foo% notation
Follows tc39/ecma262#1314.
1 parent 4035d0a commit 1ce5eb5

File tree

1 file changed

+29
-29
lines changed

1 file changed

+29
-29
lines changed

index.bs

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -3896,7 +3896,7 @@ support being iterated over to obtain a sequence of values.
38963896

38973897
Note: In the JavaScript language binding, an interface that is iterable
38983898
will have <code class="idl">entries</code>, <code class="idl">forEach</code>,
3899-
<code class="idl">keys</code>, <code class="idl">values</code>, and {{@@iterator}}
3899+
<code class="idl">keys</code>, <code class="idl">values</code>, and {{%Symbol.iterator%}}
39003900
properties on its [=interface prototype object=].
39013901

39023902
If a single type parameter is given, then the interface has a
@@ -3956,7 +3956,7 @@ Prose accompanying an [=interface=] with a [=pair iterator=] must define a [=/li
39563956
Note: This is how [=array iterator objects=] work.
39573957
For interfaces that [=support indexed properties=],
39583958
the iterator objects returned by <code class="idl">entries</code>,
3959-
<code class="idl">keys</code>, <code class="idl">values</code>, and {{@@iterator}} are
3959+
<code class="idl">keys</code>, <code class="idl">values</code>, and {{%Symbol.iterator%}} are
39603960
actual [=array iterator objects=].
39613961

39623962
[=Interfaces=] with an [=iterable declaration=] must not have any [=attributes=], [=constants=], or
@@ -4002,7 +4002,7 @@ or [=regular operations=] with these names.
40024002
next value to be iterated over. It has <code>keys</code> and <code>entries</code>
40034003
methods that iterate over the usernames of session objects
40044004
and username/<code class=idl>Session</code> object pairs, respectively. It also has
4005-
a {{@@iterator}} method that allows a <code class="idl">SessionManager</code>
4005+
a {{%Symbol.iterator%}} method that allows a <code class="idl">SessionManager</code>
40064006
to be used in a <code>for..of</code> loop that has the same value as the
40074007
<code>entries</code> method:
40084008

@@ -4099,7 +4099,7 @@ If given, an [=asynchronously iterable declaration=]'s arguments (matching
40994099

41004100
<div class="note">
41014101
In the JavaScript language binding, an interface that is asynchronously iterable will have
4102-
{{@@asyncIterator}} and <code class="idl">values</code> properties on its
4102+
{{%Symbol.asyncIterator%}} and <code class="idl">values</code> properties on its
41034103
[=interface prototype object=]. If the interface has a
41044104
[=pair asynchronously iterable declaration=], it will additionally have
41054105
<code class="idl">entries</code> and <code class="idl">keys</code> properties. All of these
@@ -4110,7 +4110,7 @@ If given, an [=asynchronously iterable declaration=]'s arguments (matching
41104110
With this in mind, the requirement that all arguments be optional ensures that, in the
41114111
JavaScript binding, <code>for</code>-<code>await</code>-<code>of</code> can work directly on
41124112
instances of the interface, since <code>for</code>-<code>await</code>-<code>of</code> calls the
4113-
{{@@asyncIterator}} method with no arguments.
4113+
{{%Symbol.asyncIterator%}} method with no arguments.
41144114
</div>
41154115

41164116
Prose accompanying an [=interface=] with an [=asynchronously iterable declaration=] must define a
@@ -4213,7 +4213,7 @@ or [=regular operations=] with these names.
42134213
<code>next</code> method that returns the next value to be iterated over.
42144214
It has <code>keys</code> and <code>entries</code> methods that iterate over the usernames of
42154215
session objects and (username, <code class=idl>Session</code>) object pairs, respectively.
4216-
It also has a {{@@asyncIterator}} method that allows a <code class="idl">SessionManager</code>
4216+
It also has a {{%Symbol.asyncIterator%}} method that allows a <code class="idl">SessionManager</code>
42174217
to be used in a <code>for await..of</code> loop that has the same value as the
42184218
<code>entries</code> method:
42194219

@@ -4299,7 +4299,7 @@ with the map entries is similar to that available on JavaScript
42994299
keyword is used, this includes <code class="idl">entries</code>,
43004300
<code class="idl">forEach</code>, <code class="idl">get</code>,
43014301
<code class="idl">has</code>, <code class="idl">keys</code>,
4302-
<code class="idl">values</code>, {{@@iterator}} methods, and a
4302+
<code class="idl">values</code>, {{%Symbol.iterator%}} methods, and a
43034303
<code class="idl">size</code> getter.
43044304
For read–write maplikes, it also includes <code class="idl">clear</code>,
43054305
<code class="idl">delete</code>, and <code class="idl">set</code> methods.
@@ -4390,7 +4390,7 @@ with the set entries is similar to that available on JavaScript
43904390
keyword is used, this includes <code class="idl">entries</code>,
43914391
<code class="idl">forEach</code>, <code class="idl">has</code>,
43924392
<code class="idl">keys</code>, <code class="idl">values</code>,
4393-
{{@@iterator}} methods, and a <code class="idl">size</code> getter.
4393+
{{%Symbol.iterator%}} methods, and a <code class="idl">size</code> getter.
43944394
For read–write setlikes, it also includes <code class="idl">add</code>,
43954395
<code class="idl">clear</code>, and <code class="idl">delete</code> methods.
43964396

@@ -6987,7 +6987,7 @@ Some objects described in this section are defined to have a <dfn id="dfn-class-
69876987
which is the string to include in the string returned from <code>Object.prototype.toString</code>.
69886988

69896989
If an object has a [=class string=] |classString|, then the object must,
6990-
at the time it is created, have a property whose name is the {{@@toStringTag}} symbol
6990+
at the time it is created, have a property whose name is the {{%Symbol.toStringTag%}} symbol
69916991
with PropertyDescriptor{\[[Writable]]: <emu-val>false</emu-val>,
69926992
\[[Enumerable]]: <emu-val>false</emu-val>, \[[Configurable]]: <emu-val>true</emu-val>,
69936993
\[[Value]]: |classString|}.
@@ -7984,7 +7984,7 @@ JavaScript Array values.
79847984

79857985
1. If <a abstract-op>Type</a>(|V|) is not Object,
79867986
[=JavaScript/throw=] a <l spec=ecmascript>{{TypeError}}</l>.
7987-
1. Let |method| be [=?=] <a abstract-op>GetMethod</a>(|V|, {{@@iterator}}).
7987+
1. Let |method| be [=?=] <a abstract-op>GetMethod</a>(|V|, {{%Symbol.iterator%}}).
79887988
1. If |method| is <emu-val>undefined</emu-val>,
79897989
[=JavaScript/throw=] a <l spec=ecmascript>{{TypeError}}</l>.
79907990
1. Return the result of [=creating a sequence from an iterable|creating a sequence=]
@@ -8681,13 +8681,13 @@ that correspond to the union's [=member types=].
86818681
that is a reference to the object |V|.
86828682
1. If <a abstract-op>Type</a>(|V|) is Object, then:
86838683
1. If |types| includes a [=sequence type=], then
8684-
1. Let |method| be [=?=] <a abstract-op>GetMethod</a>(|V|, {{@@iterator}}).
8684+
1. Let |method| be [=?=] <a abstract-op>GetMethod</a>(|V|, {{%Symbol.iterator%}}).
86858685
1. If |method| is not <emu-val>undefined</emu-val>,
86868686
return the result of
86878687
[=creating a sequence from an iterable|creating a sequence=]
86888688
of that type from |V| and |method|.
86898689
1. If |types| includes a [=frozen array type=], then
8690-
1. Let |method| be [=?=] <a abstract-op>GetMethod</a>(|V|, {{@@iterator}}).
8690+
1. Let |method| be [=?=] <a abstract-op>GetMethod</a>(|V|, {{%Symbol.iterator%}}).
86918691
1. If |method| is not <emu-val>undefined</emu-val>,
86928692
return the result of
86938693
[=Creating a frozen array from an iterable|creating a frozen array=]
@@ -10325,7 +10325,7 @@ that bare identifiers matching the property name will not resolve to
1032510325
the property in a <code>with</code> statement. This is achieved by
1032610326
including the property name on the
1032710327
[=interface prototype object=]'s
10328-
{{@@unscopables}} property's value.
10328+
{{%Symbol.unscopables%}} property's value.
1032910329

1033010330
The [{{Unscopable}}]
1033110331
extended attribute must
@@ -11234,7 +11234,7 @@ Note: The HTML Standard defines how a security check is performed. [[!HTML]]
1123411234

1123511235
and after performing the following steps,
1123611236

11237-
1. Let |method| be [=?=] <a abstract-op>GetMethod</a>(|V|, {{@@iterator}}).
11237+
1. Let |method| be [=?=] <a abstract-op>GetMethod</a>(|V|, {{%Symbol.iterator%}}).
1123811238

1123911239
|method| is not <emu-val>undefined</emu-val>, then remove from |S| all
1124011240
other entries.
@@ -11392,7 +11392,7 @@ Note: The HTML Standard defines how a security check is performed. [[!HTML]]
1139211392
converting the JavaScript values to IDL values.
1139311393
(An exception exists when one of the overloads has a [=sequence type=] or [=frozen array type=]
1139411394
at the distinguishing argument index.
11395-
In this case, we attempt to get the {{@@iterator}} property to determine the appropriate
11395+
In this case, we attempt to get the {{%Symbol.iterator%}} property to determine the appropriate
1139611396
overload, and perform the conversion of the distinguishing argument separately before continuing
1139711397
with the next step.)
1139811398

@@ -11655,7 +11655,7 @@ with the [{{LegacyNoInterfaceObject}}] [=extended attribute=].
1165511655
1. Let |desc| be the PropertyDescriptor{\[[Value]]: |unscopableObject|,
1165611656
\[[Writable]]: <emu-val>false</emu-val>, \[[Enumerable]]: <emu-val>false</emu-val>,
1165711657
\[[Configurable]]: <emu-val>true</emu-val>}.
11658-
1. Perform [=!=] <a abstract-op>DefinePropertyOrThrow</a>(|interfaceProtoObj|, {{@@unscopables}}, |desc|).
11658+
1. Perform [=!=] <a abstract-op>DefinePropertyOrThrow</a>(|interfaceProtoObj|, {{%Symbol.unscopables%}}, |desc|).
1165911659
1. If |interface| is not declared with the [{{Global}}] [=extended attribute=], then:
1166011660
1. [=Define the regular attributes=] of |interface| on |interfaceProtoObj| given |realm|.
1166111661
1. [=Define the regular operations=] of |interface| on |interfaceProtoObj| given |realm|.
@@ -12376,7 +12376,7 @@ then there must exist a property with the following characteristics:
1237612376
of [=interface=] |definition| on |target|, given [=realm=] |realm|, run the following steps:
1237712377

1237812378
1. If |definition| has an [=indexed property getter=], then:
12379-
1. Perform [$DefineMethodProperty$](|target|, {{@@iterator}},
12379+
1. Perform [$DefineMethodProperty$](|target|, {{%Symbol.iterator%}},
1238012380
{{%Array.prototype.values%}}, false).
1238112381
1. If |definition| has a [=value iterator=], then:
1238212382
1. Perform [=!=] [$CreateDataPropertyOrThrow$](|target|, "<code>entries</code>",
@@ -12388,11 +12388,11 @@ then there must exist a property with the following characteristics:
1238812388
1. Perform [=!=] [$CreateDataPropertyOrThrow$](|target|, "<code>forEach</code>",
1238912389
{{%Array.prototype.forEach%}}).
1239012390
1. Otherwise, if |definition| has a [=pair iterator=], then:
12391-
1. Define the {{@@iterator}} and <code class="idl">entries</code> methods:
12391+
1. Define the {{%Symbol.iterator%}} and <code class="idl">entries</code> methods:
1239212392
1. Let |steps| be the following series of steps:
1239312393
1. Let |jsValue| be [=?=] [$ToObject$](<emu-val>this</emu-val> value).
1239412394
1. If |jsValue| [=is a platform object=], then [=perform a security check=],
12395-
passing |jsValue|, "<code>@@iterator</code>", and "<code>method</code>".
12395+
passing |jsValue|, "<code>%Symbol.iterator%</code>", and "<code>method</code>".
1239612396
1. If |jsValue| does not [=implement=] |definition|, then [=JavaScript/throw=] a
1239712397
<l spec=ecmascript>{{TypeError}}</l>.
1239812398
1. Return a newly created [=default iterator object=] for |definition|, with
@@ -12402,7 +12402,7 @@ then there must exist a property with the following characteristics:
1240212402
1. Let |F| be [$CreateBuiltinFunction$](|steps|, « », |realm|).
1240312403
1. Perform [$SetFunctionName$](|F|, "<code>entries</code>").
1240412404
1. Perform [$SetFunctionLength$](|F|, 0).
12405-
1. Perform [$DefineMethodProperty$](|target|, {{@@iterator}}, |F|, false).
12405+
1. Perform [$DefineMethodProperty$](|target|, {{%Symbol.iterator%}}, |F|, false).
1240612406
1. Perform [=!=] [$CreateDataPropertyOrThrow$](|target|, "<code>entries</code>", |F|).
1240712407
1. Define the <code class="idl">keys</code> method:
1240812408
1. Let |steps| be the following series of steps:
@@ -12572,11 +12572,11 @@ and the string "<code> Iterator</code>".
1257212572
1. Assert: |definition| does not have an [=indexed property getter=] or an
1257312573
[=iterable declaration=].
1257412574
1. If |definition| has a [=pair asynchronously iterable declaration=], then define the
12575-
{{@@asyncIterator}} and <code class="idl">entries</code> methods:
12575+
{{%Symbol.asyncIterator%}} and <code class="idl">entries</code> methods:
1257612576
1. Let |steps| be the following series of steps, given function argument values |args|:
1257712577
1. Let |jsValue| be [=?=] [$ToObject$](<emu-val>this</emu-val> value).
1257812578
1. If |jsValue| [=is a platform object=], then [=perform a security check=], passing
12579-
|jsValue|, "<code>@@asyncIterator</code>", and "<code>method</code>".
12579+
|jsValue|, "<code>%Symbol.asyncIterator%</code>", and "<code>method</code>".
1258012580
1. If |jsValue| does not [=implement=] |definition|, then [=JavaScript/throw=] a
1258112581
<l spec=ecmascript>{{TypeError}}</l>.
1258212582
1. Let |idlObject| be the IDL [=interface type=] value that represents a reference to
@@ -12594,7 +12594,7 @@ and the string "<code> Iterator</code>".
1259412594
1. Let |F| be [$CreateBuiltinFunction$](|steps|, « », |realm|).
1259512595
1. Perform [$SetFunctionName$](|F|, "<code>entries</code>").
1259612596
1. Perform [$SetFunctionLength$](|F|, 0).
12597-
1. Perform [$DefineMethodProperty$](|target|, {{@@asyncIterator}}, |F|, false).
12597+
1. Perform [$DefineMethodProperty$](|target|, {{%Symbol.asyncIterator%}}, |F|, false).
1259812598
1. Perform [=!=] [$CreateDataPropertyOrThrow$](|target|, "<code>entries</code>", |F|).
1259912599
1. If |definition| has a [=pair asynchronously iterable declaration=], then define the
1260012600
<code class="idl">keys</code> method:
@@ -12620,7 +12620,7 @@ and the string "<code> Iterator</code>".
1262012620
1. Perform [$SetFunctionName$](|F|, "<code>keys</code>").
1262112621
1. Perform [$SetFunctionLength$](|F|, 0).
1262212622
1. Perform [=!=] [$CreateDataPropertyOrThrow$](|target|, "<code>keys</code>", |F|).
12623-
1. Define the <code class="idl">values</code>, and possibly {{@@asyncIterator}}, methods:
12623+
1. Define the <code class="idl">values</code>, and possibly {{%Symbol.asyncIterator%}}, methods:
1262412624
1. Let |steps| be the following series of steps, given function argument values |args|:
1262512625
1. Let |jsValue| be [=?=] [$ToObject$](<emu-val>this</emu-val> value).
1262612626
1. If |jsValue| [=is a platform object=], then [=perform a security check=], passing
@@ -12644,7 +12644,7 @@ and the string "<code> Iterator</code>".
1264412644
1. Perform [$SetFunctionLength$](|F|, 0).
1264512645
1. Perform [=!=] [$CreateDataPropertyOrThrow$](|target|, "<code>values</code>", |F|).
1264612646
1. If |definition| has a [=value asynchronously iterable declaration=], then perform [=!=]
12647-
[$DefineMethodProperty$](|target|, {{@@asyncIterator}}, |F|, false).
12647+
[$DefineMethodProperty$](|target|, {{%Symbol.asyncIterator%}}, |F|, false).
1264812648
</div>
1264912649

1265012650
<div algorithm>
@@ -12906,9 +12906,9 @@ with the following characteristics:
1290612906
The value of the [=function object=]'s <code class="idl">name</code> property is the String value "<code>get size</code>".
1290712907

1290812908

12909-
<h5 id="js-map-iterator" oldids="es-map-iterator,es-iterator, es-iterators">@@iterator</h5>
12909+
<h5 id="js-map-iterator" oldids="es-map-iterator,es-iterator, es-iterators">%Symbol.iterator%</h5>
1291012910

12911-
There must exist a data property whose name is the {{@@iterator}} symbol on
12911+
There must exist a data property whose name is the {{%Symbol.iterator%}} symbol on
1291212912
|A|'s [=interface prototype object=]
1291312913
with attributes { \[[Writable]]: <emu-val>true</emu-val>, \[[Enumerable]]: <emu-val>false</emu-val>, \[[Configurable]]: <emu-val>true</emu-val> }
1291412914
and whose value is the [=function object=] that is the value of
@@ -13216,9 +13216,9 @@ with the following characteristics:
1321613216
The value of the [=function object=]'s <code class="idl">name</code> property is the String value "<code>get size</code>".
1321713217

1321813218

13219-
<h5 id="js-set-iterator" oldids="es-set-iterator">@@iterator</h5>
13219+
<h5 id="js-set-iterator" oldids="es-set-iterator">%Symbol.iterator%</h5>
1322013220

13221-
There must exist a data property whose name is the {{@@iterator}} symbol on
13221+
There must exist a data property whose name is the {{%Symbol.iterator%}} symbol on
1322213222
|A|'s [=interface prototype object=]
1322313223
with attributes { \[[Writable]]: <emu-val>true</emu-val>, \[[Enumerable]]: <emu-val>false</emu-val>, \[[Configurable]]: <emu-val>true</emu-val> }
1322413224
and whose value is the [=function object=] that is the value of

0 commit comments

Comments
 (0)