Hacker News new | ask | show | jobs
by Slackwise 1355 days ago
If you read the article and the spec, you'll see that any explicitly created variables will always take precedence over automatic IDs, so any globals will always override these IDs.
2 comments

In the additional considerations section [1], they mention about not consistent behaviors between browsers. Those are the kind of issues that are quite difficult to debug.

[1] https://css-tricks.com/named-element-ids-can-be-referenced-a...

And that could be the problem if you try to access an element by id but a variable has the same name. This renders this option pretty useless.