Must built-in prototypes also be valid instances? (Was: Why DataView.prototype object's [[Class]] is "Object"?)
Brendan Eich
brendan at mozilla.org
Sat Sep 29 23:17:07 PDT 2012
I hadn't reviewed the 9-27 draft's 15.2.4.2 Object.prototype.toString ()
yet. It seems to suppress exceptions, which is bad (step 6(c)(ii)). The
...(iv) substitution of "???" for must be a placeholder but why not
throw there (in the case where @@toStringTag's value is not of String type)?
The main thing I missed there is the prefixing of "~" on any tag naming
a core language built-in constructor. What's this for? Why not for DOM
built-ins too?
/be
Yusuke Suzuki wrote:
>
> Mark S. Miller wrote:
>
> Security aside, given maximin
>
> class Foo
>
> what do you suggest Foo.prototype be?
>
>
> I suggest adding @@toStringTag:"Foo" property to Foo.prototype when
> `class Foo` is executed.
>
> _______________________________________________
> es-discuss mailing list
> es-discuss at mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss
More information about the es-discuss
mailing list