window.baz vs var baz. A subtle oddity.

Advertisements

One Reply to “window.baz vs var baz. A subtle oddity.”

  1. Because they’re in different script tags. Put them in the same script tags and it works as expected. This is bizarre because there is only one window object. Seems like IE creates a copy of a snapshot in time of the windows object for each script element before it begins interpreting any javascript or something.

    This works as expected in IE:

    http://pastebin.com/f3d7a5a66

    (This is a repost, seems like my last post was ignored because I posted the code directly into the comment)

Comments are closed.