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

Tom Van Cutsem at
Sun Nov 16 23:08:06 PST 2014

2014-11-17 3:34 GMT+01:00 Frankie Bagnardi <f.bagnardi at>:

> Consider when Array.isArray would be used.  In my experience, checks to
> see if something is an array are used for:
>  - deciding how to iterate it (for(;;) vs, for example)

This is a good one. Here, again, a typical proxy-for-array would work as
intended, as the for(;;) loop just queries .length and properties named
"0", "1", ... via standard [[Get]] access.

Can someone come up with a convincing example where a proxy-for-array would
*not* work as intended?
("convincing" here means it doesn't involve a proxy that blatantly violates
the Array contract on purpose)

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es-discuss mailing list