@@toStringTag spoofing for null and undefined

Mark S. Miller erights at google.com
Tue Jan 20 20:10:47 PST 2015


I understood and agree with everything (or close enough) until your last:

On Tue, Jan 20, 2015 at 7:20 PM, Brendan Eich <brendan at mozilla.org> wrote:

> ISTM we need more definite consensus on branding to finish off toStringTag
> in ES6.



What we don't have is an inter-realm extensible branding mechanism.

* typeof, Array.isArray, the ES5-compatible subset of O.p.toString.call's
behavior are inter-realm branding, but not extensible.

* === and WeakMap provide extensible branding, but not in a way that is
usable inter-realm.

* the rest of O.p.toString.call's behavior, i.e., the toStringTag
mechanism, is an inter-realm extensible labeling mechanism, but isn't a
branding mechanism.


Does the last bullet unask your question, or have I misunderstood?


-- 
    Cheers,
    --MarkM
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20150120/cad9ffa2/attachment.html>


More information about the es-discuss mailing list