Neil wrote:

Boris Zbarsky wrote:

Unfortunately, that's not how instanceof works in JS. Try it with Object instead of HTMLAnchorElement...

Making foo instanceof Array false across globals was an extension-breaking change when it happened. Fortunately we have Array.isArray these days.

In the interim I believe foo.constructor.name == "Array" was popular, but I see that doesn't work for (e.g.) new Image().

--
Warning: May contain traces of nuts.
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to