Object.prototype.toString.call(Uint8Array.prototype) throws a TypeError

Andrea Giammarchi andrea.giammarchi at gmail.com
Sat Aug 30 12:01:31 PDT 2014


I see, thanks for clarification.

If all native constructors will return `[object Object]` then it's OK for
`Float32Array.prototype` and others to return the same but I'd rather avoid
throwing with the most universally recognized as safe way to grab generic
variables `[[Class]]`

Regards


On Sat, Aug 30, 2014 at 1:19 PM, Claude Pache <claude.pache at gmail.com>
wrote:

>
> Le 30 août 2014 à 00:12, Andrea Giammarchi <andrea.giammarchi at gmail.com>
> a écrit :
>
> >
> > Isn't String.prototype an ordinary object ?
>
> In ES1-5, `String.prototype` is a real String object, that wraps the empty
> string [1], and it is implemented as such in current browsers. But, this is
> intended to be changed in ES6 [2], and the result of
> `Object.prototype.toString.call(String.prototype)` shall change accordingly.
>
> [1] http://www.ecma-international.org/ecma-262/5.1/#sec-15.5.4
> [2]
> http://people.mozilla.org/~jorendorff/es6-draft.html#sec-properties-of-the-string-prototype-object
>
> —Claude
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20140830/6e2bf23b/attachment.html>


More information about the es-discuss mailing list