Array.isArray(new Proxy([], {})) should be false (Bug 1096753)

Tom Van Cutsem at
Fri Nov 14 12:21:54 PST 2014

2014-11-14 21:00 GMT+01:00 Allen Wirfs-Brock <allen at>:

> On Nov 14, 2014, at 11:41 AM, Domenic Denicola wrote:
> > Yeah, more or less. A "realm-independent instanceof." This makes sense
> also from the historical perspective that `Array.isArray` was meant to
> provide a cross-realm alternative to `instanceof Array`. (I believe that
> was the case; before my time.)
> No really, it was a way to expose a test of the [[Class]] internal
> property.  That test wasn't dependent upon the [[Prototype]] chain.

I think what Domenic was saying is that Array.isArray used such a test
*because* instanceof Array didn't work reliably cross-realms. I too vaguely
recollect that reliable cross-realm "instanceof Array" testing was a
primary motivation for Array.isArray.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es-discuss mailing list