Skip to content

Commit 350fb2a

Browse files
committed
Only install @@toStringTag on interface prototype objects
This fixes https://www.w3.org/Bugs/Public/show_bug.cgi?id=28244, aligning Web IDL objects with the built-in ECMAScript objects (see #226), and updates the spec to match 1/3 engines (Chromium) instead of 0/3 as it currently does. The other two engines are willing to align, however! Tests: web-platform-tests/wpt#23140
1 parent 69fb3d3 commit 350fb2a

File tree

1 file changed

+3
-10
lines changed

1 file changed

+3
-10
lines changed

index.bs

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7175,7 +7175,7 @@ Unless otherwise specified, the \[[Prototype]] internal slot
71757175
of objects defined in this section is {{%ObjectPrototype%}}.
71767176

71777177
Some objects described in this section are defined to have a <dfn id="dfn-class-string" export>class string</dfn>,
7178-
which is the string to include in the string returned from Object.prototype.toString.
7178+
which is the string to include in the string returned from <code>Object.prototype.toString</code>.
71797179

71807180
If an object has a [=class string=] |classString|, then the object must,
71817181
at the time it is created, have a property whose name is the {{@@toStringTag}} symbol
@@ -11351,8 +11351,7 @@ Issue: Define those properties imperatively instead.
1135111351

1135211352
</div>
1135311353

11354-
The [=class string=] of an [=interface prototype object=] is the concatenation of
11355-
the [=interface=]’s [=qualified name=] and the string "<code>Prototype</code>".
11354+
The [=class string=] of an [=interface prototype object=] is the [=interface=]’s [=qualified name=].
1135611355

1135711356

1135811357
<h4 id="named-properties-object">Named properties object</h4>
@@ -12241,7 +12240,7 @@ restricted to iterating over an object’s
1224112240
[=support indexed properties|supported indexed properties=],
1224212241
use standard ECMAScript Array iterator objects.
1224312242

12244-
[=Default iterator objects=] do not have [=class strings=]; when <code
12243+
Note: [=Default iterator objects=] do not have [=class strings=]; when <code
1224512244
class="idl">Object.prototype.toString()</code> is called on a [=default
1224612245
iterator object=] of a given [=interface=], the [=class string=] of the
1224712246
[=iterator prototype object=] of that [=interface=] is used.
@@ -13170,12 +13169,6 @@ updated to be the [=interface prototype object=]
1317013169
of the [=primary interface=]
1317113170
from the [=platform object=]’s newly associated [=Realm=].
1317213171

13173-
The [=class string=] of
13174-
a platform object that implements one or more interfaces
13175-
must be the [=qualified name=] of
13176-
the [=primary interface=]
13177-
of the platform object.
13178-
1317913172
Additionally, [=platform objects=] which implement an [=interface=]
1318013173
which has a [{{Global}}] [=extended attribute=]
1318113174
get properties declaratively from:

0 commit comments

Comments
 (0)