Hacker News new | past | comments | ask | show | jobs | submit login

This has been a thing since the 90s. I really wish we'd done away with it for any document that specifies itself as HTML5.

It's great for hacking a tiny script together, however.




Yeah, HTML5 explicitly documented the compatible behaviors between browsers to reach uniformity, which meant standardizing a lot of weird stuff instead of trying to fix it.

See for example this thread where Mozilla tried to not do this: https://bugzilla.mozilla.org/show_bug.cgi?id=622491


Yep, same here. The only time I use this bit of knowledge nowadays is in the console. If I see a tag has an ID, I save myself a few characters by just referring to it as a variable since I know it's already there anyways.

IDs were the only way to get a reference to an element early on if I'm remembering correctly. Or maybe the DOM API just wasn't well known. All the examples and docs just used IDs, that I can remember for sure.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: