[heycam/webidl] Only install @@toStringTag on the prototype (#357)

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.

(Currently no non-Chrome browsers install Symbol.toStringTag properties on any objects, but instead contradict the ECMAScript specification and use magic to produce [object InterfaceName] / [object InterfaceNamePrototype].)

---

/cc @bzbarsky, who tried to implement this in https://groups.google.com/forum/#!searchin/mozilla.dev.platform/toStringTag%7Csort:relevance/mozilla.dev.platform/IZNh8QAXkFA/me59gpo5PgAJ but got pushback.

/cc @travisleithead and @samweinig about implementing this in Edge and WebKit.
You can view, comment on, or merge this pull request online at:

  https://github.com/heycam/webidl/pull/357

-- Commit Summary --

  * Only install @@toStringTag on the prototype

-- File Changes --

    M index.bs (33)

-- Patch Links --

https://github.com/heycam/webidl/pull/357.patch
https://github.com/heycam/webidl/pull/357.diff

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/heycam/webidl/pull/357

Received on Monday, 1 May 2017 22:07:46 UTC