
DOM elements with ID's are global variables - polskibus
https://dev.to/buntine/dom-elements-with-ids-are-global-variables
======
jzs
Your point is valid that giving your html tags id's are like defining global
objects.

In fact some browsers give you warnings if you have two tags with the same id
defined.

However this is by no means a new 'feature'. Maybe it's time to take a brush
up on the DOM model.

Oh. And yes. The web technologies are a whole pile of worms in itself. Just
think of the hacks that Javascript frameworks go through in order to render
things just somewhat fast.

