12:56
<laurentdhont>
Good evening to all. I wonder where I can find the specification for the automatic creation of variables using the id of HTML elements. Should I look in the ES or HTML spec, and what is the term for this auto creation?
12:57
<Ms2ger 💉💉>
HTML
12:57
<Ms2ger 💉💉>
https://html.spec.whatwg.org/multipage/window-object.html#named-access-on-the-window-object
13:00
<Andreu Botella (he/they)>
They're not variables. In JS, when you use a variable name that isn't in scope, it's looked up as a property of the global object (window in this case)
13:06
<laurentdhont>
Thank you very much, this really helped. Is there any way to disable this? I guess not
15:23
<Sam Sneddon [:gsnedders]>
see also https://tc39.es/ecma262/#sec-global-environment-records for global environment records in ES