Discussion on: DOM elements with ID's are global variables

karfau profile image
Christian Bewernitz

Since it's still a browser doing the rendering, it needs at least a script tag to run the JavaScript(not sure if only having a script tag in an HTML file would be valid HTML5). And usually some more but minimal HTML is still delivered to the browser.
Sometimes devs are not aware of it, because this file rarely changes in the code base, or it is "hidden" because the build tool applies some default template.

Thread Thread
buntine profile image
Andrew Buntine Author

Yep, absolutely. To clarify, the comment is referring to the HTML elements which make up the visible UI of a particular app. Images, titles, tables, lists, etc, etc. :)