If I have a a.stuff()
(it\'s like as if a
is a global variable).>
Technically, this question is opinion, but it's a good question.
IE does this as well and it has caused headaches for some.
The rules for naming variables in JavaScript and IDs in HTML are different. I can't see how this is a good thing.
For instance, on this page there is an element with an ID of "notify-container". That's not a valid JavaScript name at all.
Also, when are these names bound? If an inline script declares a variable and then the element appears later, which has precedence?
It's cannot be made consistent.