created by Brian LeRoux & Andrew Lunny. sparodically uncurated by David Trejo.

2010 02 25 ie scope

@jaffathecake has some more fun with IE. As we do.

    window.window == window // true
    window.window === window // false
    window == document // true. wtf!

@filmaj says, “I think it’s because object equality implicitly calls toString(), and in IE most native DOM objects return just ‘[object]’ in toString(), whereas standard browser return something like ‘[object ClassName]’, which is probably why WebKit doesn’t do the same thing.”

Fuckin IE, eh.

Fork me on GitHub