Must built-in prototypes also be valid instances? (Was: Why DataView.prototype object's [[Class]] is "Object"?)
waldron.rick at gmail.com
Sun Sep 30 07:17:22 PDT 2012
On Sunday, September 30, 2012 at 12:04 AM, Brendan Eich wrote:
> Rick Waldron wrote:
> > On Sat, Sep 29, 2012 at 6:19 PM, Brendan Eich <brendan at mozilla.org
> > <mailto:brendan at mozilla.org>> 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:
> > 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?
> Which "that"?
Using the prototype object here:
> > Object.prototype.toString.call(Uint8Array.prototype).slice(8,-1))
But it's really usecase dependent, sorry for the noise
> > Generally the [[Class]] (NativeBrand?) is derived via
> > Object.prototype.toString.call(Uint8Array).slice(8,-1)
> > (sans .prototype)
> I'm saying typed arrays from khronos are underspecified, and
> implementations vary. Something to fix in ES6.
Got it, this answers all of my questions so far. Thanks
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the es-discuss