Primary issue is in  isTypedArray(a):
Uin32Array.prototype.buffer.call(a);

Besides the typos, accessing .buffer throws in at least Chrome & Firefox.
Then .buffer is an object so if it doesn't throw there's no .call to
execute.

-JDD


On Wed, Jan 28, 2015 at 4:55 PM, Allen Wirfs-Brock <al...@wirfs-brock.com>
wrote:

>
> On Jan 28, 2015, at 4:40 PM, John-David Dalton <
> john.david.dal...@gmail.com> wrote:
>
> Kind of a bummer. The isTypedArray example from
> https://esdiscuss.org/topic/tostringtag-spoofing-for-null-and-undefined#content-59
>  is
> incorrect. Is there an updated reference somewhere?
> The toStringTag result is handy because it allows checking against several
> tags at once without having to invoke multiple functions each with their
> own try-catch and all that perf baggage.
>
> How is it incorrect?  Are you referring to the fact that both typed arrays
> and DataView objects have a [[ViewedArrayBuffer]] internal slot.  If so,
> I think this is a specification but that I should fix.
>
> Allen
>
>
_______________________________________________
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to