Gecko (Firefox) does this in quirks mode only. We're holding the line against this for the moment (<a href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=11960" rel="nofollow">http://www.w3.org/Bugs/Public/show_bug.cgi?id=11960</a>).
tldr version, minus the usual stackoverflow backandforth:<p>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.<p>With some quick testing in Chrome, IE, and Opera, it appears that these elements are enumerable off of "window" in Opera but <i>not</i> Chrome and IE (perhaps those two browsers create them only when you access them).
Yep, Microsoft did it, and everyone else (for some reason) followed. My approach is to actively avoid relying on it for real work - but pull it out for the JS1K/10K comps ;)
You can, however, abuse this quite nicely for size-optimized javascript demos. For example if you look at some of the <a href="http://js1k.com/" rel="nofollow">http://js1k.com/</a> submissions. For anything other than those experiments, you should of course avoid.
The IE guys are saying this needs to be kept for backwards compatibility. <a href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=11960#c8" rel="nofollow">http://www.w3.org/Bugs/Public/show_bug.cgi?id=11960#c8</a><p>Why can't it be kept for old doctypes and quirksmode like Gecko does? The HTML5 doctype should get rid of this. Surely <i>that</i> wouldn't break top sites as MSFT is saying: <a href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=11960#c12" rel="nofollow">http://www.w3.org/Bugs/Public/show_bug.cgi?id=11960#c12</a>