Id in HTML gives window a key

September 17, 2017

Say you have a HTML tag like

  <h1 id='lol'>Hello</h1>

This means you can access the elements with an id lol by

window.lol
//=> 
<h1 id=​"lol">​Hello​</h1>​

Tagged withdom, javascript, html

Questions, Comments, Suggestions? Open an Issue