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

Claude Pache claude.pache at gmail.com
Sat Aug 30 05:19:41 PDT 2014

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


More information about the es-discuss mailing list