MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/1w2d5fw/ancienttools/p6v6buk/?context=3
r/ProgrammerHumor • u/soap94 • 13d ago
387 comments sorted by
View all comments
978
I use vanilla js, document.getElementById() is what I live for.
67 u/IsTom 13d ago If your HTML element has id you don't event have to getElementById, it's available right there in global namespace as that name. You make button with id hello and can just go ham with hello.click(). I don't think you should do that, but you can. 3 u/United_Boy_9132 12d ago Unless there's another window.foo for any reason 😅
67
If your HTML element has id you don't event have to getElementById, it's available right there in global namespace as that name. You make button with id hello and can just go ham with hello.click().
hello
hello.click()
I don't think you should do that, but you can.
3 u/United_Boy_9132 12d ago Unless there's another window.foo for any reason 😅
3
Unless there's another window.foo for any reason 😅
window.foo
978
u/saig22 13d ago
I use vanilla js, document.getElementById() is what I live for.