Infrequently Noted

Alex Russell on browsers, standards, and the process of progress.

Comments for Firefox 3 Arrays: No, You're Not Insane


Confirmed on Firefox 3 Beta 3. Both print out Array() as their constructor, but apparently they're not considered equal. WTF?
by kourge at
In short: ([] instanceof Array) gives 'false'

I wonder if this has anything to do with the protection against JavaScript Hijacking that they put in to prevent people from stealing data by redefining the Array constructor?

I guess working with Spidermonkey has corrupted me. This is wrong, but I doesn't seem like a particularly weird way to fail, to me.
by Aaron at
According to Wolfram's comment on Ajaxian, this time println *is* broken. And I've confirmed this too. [].constructor == new Array().constructor will evaluate to true if you try this in Error Console instead of Firebug.
by kourge at
Wolfram also let me know today that it's only firebug...I was wondering why all of Dojo hadn't broken = )
by alex at