I have found that I don't need use document.getElementById
to get the an element, I can use like this:
<div id="observer1"></div>
Then i can access like a variable:
console.log(observer1);
Why should I use the document.getElementById
if I can access directly?
I had never heard that this was possible, is there any side-effect, is this supported in all browsers?
Thank you.