On Feb 25, 2011, at 9:00 AM, Boris Zbarsky wrote: > On 2/25/11 9:05 AM, Brendan Eich wrote: >> typeof x == typeof y&& x == y<=> x === y >> >> (That one, I believe all engines uphold.) > > Though Spidermonkey used to not have this for x and y objects (equality > hooks, etc). Has that changed?
Those were added for E4X: js> x = <x>hi</x> <x>hi</x> js> y = <x>hi</x> <x>hi</x> js> x == y true js> x === y false js> typeof x "xml" js> typeof y "xml" Again, turn a blind eye (the other one; uh oh). These may be used also have been used for proxies or wrappers, and IIRC IE had some COM interface that allowed equality among proxies, but I'm not sure of the details. Firefox 4 security membranes do not cheat. As long as == and === exist and engines have rich-enough embedding APIs, shenanigans will happen. Invariants need socialization out to the remote wastelands of browser DOMs, COM-like bridge layers, etc. Fight the good fight. /be _______________________________________________ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss