
DOM elements with ID's are global variables - nreece
https://dev.to/buntine/dom-elements-with-ids-are-global-variables
======
combatentropy
Great find! Not only do element IDs become global variables but so do names if
they're on one of these tags: embed, form, img, and object. At least it
happened when I tested in Firefox and Chrome (I didn't test it in Internet
Explorer).

The standard also says that it should happen for the name attribute on a
frameset element, but that didn't work when I tried.
[https://html.spec.whatwg.org/#named-access-on-the-window-
obj...](https://html.spec.whatwg.org/#named-access-on-the-window-object)

