@trysdyn Your guess is exactly correct - this used to be a more common practice in the bad old IE6 days, if I remember correctly, especially with form elements, but at some point people realized that this was generating bugs like nobody's business and so it got functionally deprecated by the broader webdev community
@joepie91 Yeah I found out because wrote a bug in something where I getElementById()ed a bunch of things into placeholders then did a bunch of operations on them, and missed one and the code worked anyway until I started pointing linters at it and they started screaming about this completely undefined variable that happened to be the same as the element's ID.
That was a very confusing moment or two.
So it's still causing bugs ;)
@trysdyn I *think* this behaviour is one of the things that's turned off in strict mode? But I'm not 100% sure
@joepie91 Yeah. Part of this massive refactor/cleanup pass I'm doing is to get to the point where I just start using that. This codebase started as my fuck-around/find-out project and now I'm in a place where I think I can handle the finding out.
@trysdyn (There's a pretty big collection of very cursed old browser stuff that we're all collectively pretending doesn't exist, because Never Break The Web means that it cannot *actually* be removed)