<button id="foo">foo</button> // don't select foo in any way... but.. foo.onclick = () => alert('still works'); // ... for years now!pic.twitter.com/4yBIlvKrgP
-
Show this thread
-
@_jayphelps and I are buggin' out about this. He looked it up and apparently this has been around a while.4 replies 0 retweets 2 likesShow this thread -
Replying to @BenLesh @_jayphelps
It’s been around forever, although it wasn’t specified until “HTML5” happened IIRC. https://html.spec.whatwg.org/multipage/window-object.html#named-access-on-the-window-object …
1 reply 0 retweets 2 likes -
Replying to @mathias @_jayphelps
Well, esp. today, I'VE been around forever, and this is the first I've heard of this. I've been using getElementById, then querySelector.
2 replies 0 retweets 1 like
Replying to @BenLesh @_jayphelps
And rightfully so! See the warning in the HTML standard.pic.twitter.com/9QMbnTYyWw
0 replies
1 retweet
1 like
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
JavaScript, HTML, CSS, HTTP, performance, security, Bash, Unicode, i18n, macOS.