Skip to content

Commit

Permalink
Only install @@toStringTag on the prototype
Browse files Browse the repository at this point in the history
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 updating the spec to match 1/4 browsers (Chrome) instead of 0/4 as it currently does.
  • Loading branch information
domenic committed May 1, 2017
1 parent 9d039f6 commit fe1ff92
Showing 1 changed file with 6 additions and 27 deletions.
33 changes: 6 additions & 27 deletions index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -6408,16 +6408,10 @@ Unless otherwise specified, the \[[Prototype]] internal property
of objects defined in this section is the <emu-val>Object</emu-val> prototype object.

Some objects described in this section are defined to have a <dfn id="dfn-class-string" export>class string</dfn>,
which is the string to include in the string returned from Object.prototype.toString.
which is the string to include in the string returned from <code>Object.prototype.toString</code>.
If an object has a class string, then the object must,
at the time it is created, have a property whose name is the [=@@toStringTag=] symbol
and whose value is the specified string.

<p class="issue">
Should define whether [=@@toStringTag=] is writable, enumerable and configurable.
All [=@@toStringTag=] properties in the ES6 spec are non-writable and non-enumerable,
and configurable.
</p>
at the time it is created, have a property whose name is the [=@@toStringTag=] symbol,
whose value is the specified string, and which is non-writable, non-enumerable, and configurable.

If an object is defined to be a <dfn id="dfn-function-object" export>function object</dfn>, then
it has characteristics as follows:
Expand Down Expand Up @@ -10269,8 +10263,7 @@ of [=inherited interfaces=] for any
other interface that is declared with one of these attributes, then the [=interface prototype object=]
must be an [=immutable prototype exotic object=].

The [=class string=] of an [=interface prototype object=] is the concatenation of
the [=interface=]’s [=identifier=] and the string “Prototype”.
The [=class string=] of an [=interface prototype object=] is the [=interface=]’s [=identifier=].


<h4 id="legacy-callback-interface-object">Legacy callback interface object</h4>
Expand Down Expand Up @@ -11195,10 +11188,6 @@ use standard ECMAScript Array iterator objects.
When a [=default iterator object=] is first created,
its index is set to 0.

The [=class string=] of a [=default iterator object=] for a given [=interface=]
is the result of concatenting the [=identifier=] of the [=interface=]
and the string “Iterator”.


<h5 id="es-iterator-prototype-object">Iterator prototype object</h5>

Expand Down Expand Up @@ -11260,7 +11249,7 @@ must be [=%IteratorPrototype%=].
</div>

The [=class string=] of an [=iterator prototype object=] for a given [=interface=]
is the result of concatenting the [=identifier=] of the [=interface=]
is the result of concatenating the [=identifier=] of the [=interface=]
and the string “Iterator”.


Expand Down Expand Up @@ -11755,12 +11744,6 @@ updated to be the [=interface prototype object=]
of the [=primary interface=]
from the [=platform object=]’s newly associated global environment.

The [=class string=] of
a platform object that implements one or more interfaces
must be the [=identifier=] of
the [=primary interface=]
of the platform object.


<h4 id="platform-object-setprototypeof" oldids="platformobjectsetprototypeof">\[[SetPrototypeOf]]</h4>

Expand Down Expand Up @@ -12508,7 +12491,7 @@ have an internal \[[Prototype]] property whose value is [=%ErrorPrototype%=].

The [=class string=] of the
[=DOMException prototype object=]
is “DOMExceptionPrototype”.
is “DOMException”.

There must be a property named “constructor”
on the DOMException prototype object with attributes
Expand Down Expand Up @@ -12543,10 +12526,6 @@ property of a {{DOMException}}
object must be the [=DOMException prototype object=]
from the global environment the exception object is associated with.

The [=class string=]
of a {{DOMException}} object
must be “DOMException”.

Note: The intention is for DOMException objects to be just like the other
various native <emu-val>Error</emu-val> objects that the
ECMAScript specification defines, apart from responding differently
Expand Down

0 comments on commit fe1ff92

Please sign in to comment.