On Sep 29, 2012, at 7:26 PM, Rick Waldron wrote: > > > On Sat, Sep 29, 2012 at 6:19 PM, Brendan Eich <[email protected]> wrote: > Allen Wirfs-Brock wrote: > My intention, subject to feedback here and from TC39, is to follow the > pattern I used for Map as much as possible. However, TypedArray object are > all ready implemented by all major browsers to that may limit how we apply it > to them. > > Implementations differ: > > javascript:alert(Object.prototype.toString.call(Uint8Array.prototype).slice(8,-1)) > > in Opera says "Uint8Array", while in Firefox and Safari it says > "Uint8ArrayPrototype". Chrome says "Object". I can't test IE here. > > How common is that? Generally the [[Class]] (NativeBrand?) is derived via > > Object.prototype.toString.call(Uint8Array).slice(8,-1)
Note that the intent of [[NativeBrand]] is not just a renaming of [[Class]]. As the change notes for the latest draft stated, that draft as spec. for Object.prototype.toString that support an extensibility model that does not depend upon [[Class]]/[[NativeBrand]]. My hope is that we do not define any new [[Class]]/[[NativeBrand]] values other than the ones that are need to support its legacy use for nominal type testing of the 10 (or so) existing built-ins. I also hope to use the new toString extension point in all the new built-ins. You can see this in the Map specification. Allen
_______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

