Are DOM tree elements global variables?
stackoverflow.com
stackoverflow.com
Named elements are made into properties of the "window" object in Chrome, IE, and Opera. That would include any element with an "id" attribute and most elements with a "name" attribute. Thankfully, any vars you declare in this scope override the DOM ones.
With some quick testing in Chrome, IE, and Opera, it appears that these elements are enumerable off of "window" in Opera but not Chrome and IE (perhaps those two browsers create them only when you access them).
Why can't it be kept for old doctypes and quirksmode like Gecko does? The HTML5 doctype should get rid of this. Surely that wouldn't break top sites as MSFT is saying: http://www.w3.org/Bugs/Public/show_bug.cgi?id=11960#c12