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

Kevin Smith zenparsing at gmail.com
Fri Nov 14 08:56:31 PST 2014


>
> This is really interesting. It does argue for some kind of redefinition of
> Array.isArray to return "is this an instance of some %ArrayPrototype% in
> some realm?"
>

Yeah, my guess would be that if (Array.isArray(obj) === true), then the
user will infer that one or both of the following is true:

- It behaves as if it were created with an array literal (including the
length invariant and Array.prototype methods).
- It should be "rendered" (via JSON or console output) as if it were
created with an array literal.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20141114/1c3bfe0c/attachment-0001.html>


More information about the es-discuss mailing list