Skip to content

Commit bf88a5a

Browse files
committed
Make setlike/maplike generated properties enumerable
This makes the properties generated by the maplike/setlike declarations consistent with properties generated by other IDL constructs such as operation and attribute declarations. (That includes, e.g., explicitly-specified has/get/set/delete operations!) This is also consistent with the generated properties for iterable declarations. The @@iterator symbol property remains non-enumerable, like it is for iterable declarations, and like all other symbol-named properties are. Closes #738.
1 parent 9c49ede commit bf88a5a

File tree

1 file changed

+19
-21
lines changed

1 file changed

+19
-21
lines changed

index.bs

Lines changed: 19 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -11536,7 +11536,6 @@ with the [{{LegacyNoInterfaceObject}}] [=extended attribute=].
1153611536
Additionally, [=interface prototype objects=] get properties declaratively from:
1153711537

1153811538
* [[#es-stringifier]],
11539-
* [[#es-iterable]],
1154011539
* [[#es-maplike]], and
1154111540
* [[#es-setlike]].
1154211541

@@ -12741,7 +12740,7 @@ There must exist a <code class="idl">size</code> property on
1274112740
with the following characteristics:
1274212741

1274312742
* The property has attributes
12744-
{ \[[Get]]: |G|, \[[Enumerable]]: <emu-val>false</emu-val>, \[[Configurable]]: <emu-val>true</emu-val> },
12743+
{ \[[Get]]: |G|, \[[Enumerable]]: <emu-val>true</emu-val>, \[[Configurable]]: <emu-val>true</emu-val> },
1274512744
where |G| is the interface's <dfn id="dfn-map-size-getter" export>map size getter</dfn>,
1274612745
defined below.
1274712746
* <div algorithm="to invoke the size method of Maps">
@@ -12796,7 +12795,7 @@ There must exist an <code class="idl">entries</code> data property on
1279612795
|A|'s [=interface prototype object=]
1279712796
with the following characteristics:
1279812797

12799-
* The property has attributes { \[[Writable]]: <emu-val>true</emu-val>, \[[Enumerable]]: <emu-val>false</emu-val>, \[[Configurable]]: <emu-val>true</emu-val> }.
12798+
* The property has attributes { \[[Writable]]: <emu-val>true</emu-val>, \[[Enumerable]]: <emu-val>true</emu-val>, \[[Configurable]]: <emu-val>true</emu-val> }.
1280012799
* The value of the property is a [=built-in function object=]
1280112800
whose behavior when invoked is as follows:
1280212801

@@ -12817,7 +12816,7 @@ There must exist a <code class="idl">keys</code> data property on
1281712816
|A|'s [=interface prototype object=]
1281812817
with the following characteristics:
1281912818

12820-
* The property has attributes { \[[Writable]]: <emu-val>true</emu-val>, \[[Enumerable]]: <emu-val>false</emu-val>, \[[Configurable]]: <emu-val>true</emu-val> }.
12819+
* The property has attributes { \[[Writable]]: <emu-val>true</emu-val>, \[[Enumerable]]: <emu-val>true</emu-val>, \[[Configurable]]: <emu-val>true</emu-val> }.
1282112820
* The value of the property is a [=built-in function object=]
1282212821
whose behavior when invoked is as follows:
1282312822

@@ -12839,7 +12838,7 @@ There must exist a <code class="idl">values</code> data property on
1283912838
|A|'s [=interface prototype object=]
1284012839
with the following characteristics:
1284112840

12842-
* The property has attributes { \[[Writable]]: <emu-val>true</emu-val>, \[[Enumerable]]: <emu-val>false</emu-val>, \[[Configurable]]: <emu-val>true</emu-val> }.
12841+
* The property has attributes { \[[Writable]]: <emu-val>true</emu-val>, \[[Enumerable]]: <emu-val>true</emu-val>, \[[Configurable]]: <emu-val>true</emu-val> }.
1284312842
* The value of the property is a [=built-in function object=]
1284412843
whose behavior when invoked is as follows:
1284512844

@@ -12861,7 +12860,7 @@ There must exist a <code class="idl">forEach</code> data property on
1286112860
|A|'s [=interface prototype object=]
1286212861
with the following characteristics:
1286312862

12864-
* The property has attributes { \[[Writable]]: <emu-val>true</emu-val>, \[[Enumerable]]: <emu-val>false</emu-val>, \[[Configurable]]: <emu-val>true</emu-val> }.
12863+
* The property has attributes { \[[Writable]]: <emu-val>true</emu-val>, \[[Enumerable]]: <emu-val>true</emu-val>, \[[Configurable]]: <emu-val>true</emu-val> }.
1286512864
* The value of the property is a [=built-in function object=]
1286612865
whose behavior when invoked is as follows:
1286712866

@@ -12889,7 +12888,7 @@ There must exist a <code class="idl">get</code> data property on
1288912888
|A|'s [=interface prototype object=]
1289012889
with the following characteristics:
1289112890

12892-
* The property has attributes { \[[Writable]]: <emu-val>true</emu-val>, \[[Enumerable]]: <emu-val>false</emu-val>, \[[Configurable]]: <emu-val>true</emu-val> }.
12891+
* The property has attributes { \[[Writable]]: <emu-val>true</emu-val>, \[[Enumerable]]: <emu-val>true</emu-val>, \[[Configurable]]: <emu-val>true</emu-val> }.
1289312892
* The value of the property is a [=built-in function object=]
1289412893
that behaves as follows when invoked:
1289512894

@@ -12916,7 +12915,7 @@ There must exist a <code class="idl">has</code> data property on
1291612915
|A|'s [=interface prototype object=]
1291712916
with the following characteristics:
1291812917

12919-
* The property has attributes { \[[Writable]]: <emu-val>true</emu-val>, \[[Enumerable]]: <emu-val>false</emu-val>, \[[Configurable]]: <emu-val>true</emu-val> }.
12918+
* The property has attributes { \[[Writable]]: <emu-val>true</emu-val>, \[[Enumerable]]: <emu-val>true</emu-val>, \[[Configurable]]: <emu-val>true</emu-val> }.
1292012919
* The value of the property is a [=built-in function object=]
1292112920
that behaves as follows when invoked:
1292212921

@@ -12945,7 +12944,7 @@ then there must exist a <code class="idl">set</code> data property
1294512944
on |A|'s [=interface prototype object=]
1294612945
with the following characteristics:
1294712946

12948-
* The property has attributes { \[[Writable]]: <emu-val>true</emu-val>, \[[Enumerable]]: <emu-val>false</emu-val>, \[[Configurable]]: <emu-val>true</emu-val> }.
12947+
* The property has attributes { \[[Writable]]: <emu-val>true</emu-val>, \[[Enumerable]]: <emu-val>true</emu-val>, \[[Configurable]]: <emu-val>true</emu-val> }.
1294912948
* The value of the property is a [=built-in function object=]
1295012949
that behaves as follows when invoked:
1295112950

@@ -12980,7 +12979,7 @@ then there must exist a <code class="idl">delete</code> data property
1298012979
on |A|'s [=interface prototype object=]
1298112980
with the following characteristics:
1298212981

12983-
* The property has attributes { \[[Writable]]: <emu-val>true</emu-val>, \[[Enumerable]]: <emu-val>false</emu-val>, \[[Configurable]]: <emu-val>true</emu-val> }.
12982+
* The property has attributes { \[[Writable]]: <emu-val>true</emu-val>, \[[Enumerable]]: <emu-val>true</emu-val>, \[[Configurable]]: <emu-val>true</emu-val> }.
1298412983
* The value of the property is a [=built-in function object=]
1298512984
that behaves as follows when invoked:
1298612985

@@ -13015,7 +13014,7 @@ then there must exist a <code class="idl">clear</code> data property
1301513014
on |A|'s [=interface prototype object=]
1301613015
with the following characteristics:
1301713016

13018-
* The property has attributes { \[[Writable]]: <emu-val>true</emu-val>, \[[Enumerable]]: <emu-val>false</emu-val>, \[[Configurable]]: <emu-val>true</emu-val> }.
13017+
* The property has attributes { \[[Writable]]: <emu-val>true</emu-val>, \[[Enumerable]]: <emu-val>true</emu-val>, \[[Configurable]]: <emu-val>true</emu-val> }.
1301913018
* The value of the property is a [=built-in function object=]
1302013019
that behaves as follows when invoked:
1302113020

@@ -13051,7 +13050,7 @@ A <code class="idl">size</code> property must exist on
1305113050
|A|'s [=interface prototype object=]
1305213051
with the following characteristics:
1305313052

13054-
* The property has attributes { \[[Get]]: |G|, \[[Enumerable]]: <emu-val>false</emu-val>, \[[Configurable]]: <emu-val>true</emu-val> },
13053+
* The property has attributes { \[[Get]]: |G|, \[[Enumerable]]: <emu-val>true</emu-val>, \[[Configurable]]: <emu-val>true</emu-val> },
1305513054
where |G| is the interface's <dfn id="dfn-set-size-getter" export>set size getter</dfn>,
1305613055
defined below.
1305713056
* <div algorithm="to invoke the size method of Sets">
@@ -13105,7 +13104,7 @@ There must exist an <code class="idl">entries</code> data property on
1310513104
|A|'s [=interface prototype object=]
1310613105
with the following characteristics:
1310713106

13108-
* The property has attributes { \[[Writable]]: <emu-val>true</emu-val>, \[[Enumerable]]: <emu-val>false</emu-val>, \[[Configurable]]: <emu-val>true</emu-val> }.
13107+
* The property has attributes { \[[Writable]]: <emu-val>true</emu-val>, \[[Enumerable]]: <emu-val>true</emu-val>, \[[Configurable]]: <emu-val>true</emu-val> }.
1310913108
* The value of the property is a [=built-in function object=]
1311013109
whose behavior when invoked is as follows:
1311113110

@@ -13127,7 +13126,7 @@ the String value "<code>entries</code>".
1312713126

1312813127
A <code class="idl">keys</code> data property must exist
1312913128
on |A|'s [=interface prototype object=]
13130-
with attributes { \[[Writable]]: <emu-val>true</emu-val>, \[[Enumerable]]: <emu-val>false</emu-val>, \[[Configurable]]: <emu-val>true</emu-val> }
13129+
with attributes { \[[Writable]]: <emu-val>true</emu-val>, \[[Enumerable]]: <emu-val>true</emu-val>, \[[Configurable]]: <emu-val>true</emu-val> }
1313113130
and whose value is the [=function object=] that is the value of
1313213131
the <code class="idl">values</code> property.
1313313132

@@ -13138,7 +13137,7 @@ There must exist a <code class="idl">values</code> data property on
1313813137
|A|'s [=interface prototype object=]
1313913138
with the following characteristics:
1314013139

13141-
* The property has attributes { \[[Writable]]: <emu-val>true</emu-val>, \[[Enumerable]]: <emu-val>false</emu-val>, \[[Configurable]]: <emu-val>true</emu-val> }.
13140+
* The property has attributes { \[[Writable]]: <emu-val>true</emu-val>, \[[Enumerable]]: <emu-val>true</emu-val>, \[[Configurable]]: <emu-val>true</emu-val> }.
1314213141
* The value of the property is a [=built-in function object=]
1314313142
whose behavior when invoked is as follows:
1314413143

@@ -13162,7 +13161,7 @@ There must exist a <code class="idl">forEach</code> data property on
1316213161
|A|'s [=interface prototype object=]
1316313162
with the following characteristics:
1316413163

13165-
* The property has attributes { \[[Writable]]: <emu-val>true</emu-val>, \[[Enumerable]]: <emu-val>false</emu-val>, \[[Configurable]]: <emu-val>true</emu-val> }.
13164+
* The property has attributes { \[[Writable]]: <emu-val>true</emu-val>, \[[Enumerable]]: <emu-val>true</emu-val>, \[[Configurable]]: <emu-val>true</emu-val> }.
1316613165
* The value of the property is a [=built-in function object=]
1316713166
whose behavior when invoked is as follows:
1316813167

@@ -13190,7 +13189,7 @@ There must exist a <code class="idl">has</code> data property on
1319013189
|A|'s [=interface prototype object=]
1319113190
with the following characteristics:
1319213191

13193-
* The property has attributes { \[[Writable]]: <emu-val>true</emu-val>, \[[Enumerable]]: <emu-val>false</emu-val>, \[[Configurable]]: <emu-val>true</emu-val> }.
13192+
* The property has attributes { \[[Writable]]: <emu-val>true</emu-val>, \[[Enumerable]]: <emu-val>true</emu-val>, \[[Configurable]]: <emu-val>true</emu-val> }.
1319413193
* The value of the property is a [=built-in function object=]
1319513194
that behaves as follows when invoked:
1319613195

@@ -13219,7 +13218,7 @@ then there must exist an <code class="idl">add</code> data property
1321913218
on |A|'s [=interface prototype object=]
1322013219
with the following characteristics:
1322113220

13222-
* The property has attributes { \[[Writable]]: <emu-val>true</emu-val>, \[[Enumerable]]: <emu-val>false</emu-val>, \[[Configurable]]: <emu-val>true</emu-val> }.
13221+
* The property has attributes { \[[Writable]]: <emu-val>true</emu-val>, \[[Enumerable]]: <emu-val>true</emu-val>, \[[Configurable]]: <emu-val>true</emu-val> }.
1322313222
* The value of the property is a [=built-in function object=]
1322413223
that behaves as follows when invoked:
1322513224

@@ -13252,7 +13251,7 @@ then there must exist a <code class="idl">delete</code> data property
1325213251
on |A|'s [=interface prototype object=]
1325313252
with the following characteristics:
1325413253

13255-
* The property has attributes { \[[Writable]]: <emu-val>true</emu-val>, \[[Enumerable]]: <emu-val>false</emu-val>, \[[Configurable]]: <emu-val>true</emu-val> }.
13254+
* The property has attributes { \[[Writable]]: <emu-val>true</emu-val>, \[[Enumerable]]: <emu-val>true</emu-val>, \[[Configurable]]: <emu-val>true</emu-val> }.
1325613255
* The value of the property is a [=built-in function object=]
1325713256
that behaves as follows when invoked:
1325813257

@@ -13285,7 +13284,7 @@ then there must exist a <code class="idl">clear</code> data property
1328513284
on |A|'s [=interface prototype object=]
1328613285
with the following characteristics:
1328713286

13288-
* The property has attributes { \[[Writable]]: <emu-val>true</emu-val>, \[[Enumerable]]: <emu-val>false</emu-val>, \[[Configurable]]: <emu-val>true</emu-val> }.
13287+
* The property has attributes { \[[Writable]]: <emu-val>true</emu-val>, \[[Enumerable]]: <emu-val>true</emu-val>, \[[Configurable]]: <emu-val>true</emu-val> }.
1328913288
* The value of the property is a [=built-in function object=]
1329013289
that behaves as follows when invoked:
1329113290

@@ -13473,7 +13472,6 @@ which has a [{{Global}}] [=extended attribute=]
1347313472
get properties declaratively from:
1347413473

1347513474
* [[#es-stringifier]],
13476-
* [[#es-iterable]],
1347713475
* [[#es-maplike]], and
1347813476
* [[#es-setlike]].
1347913477

0 commit comments

Comments
 (0)