Images with id no longer appear as window properties

Published: | Categories: DOM


Starting with Firefox 26, <img> elements having the id attribute were appearing as enumerable properties on the window object as per the HTML spec, so <img id="logo"> for example was accessible via the window.logo property. The spec has later changed to switch back to the previous behaviour that matches Safari and Chrome. Firefox 42 has updated the implementation accordingly, therefore such images are no longer on window.