Why `autofocus` instead of `button.focus()` in this case? `autofocus` is only useful as an HTML attribute, not dynamically.
Replying to @bramus
Since the JS executes right away (and not on e.g. document ready) step 9 of https://html.spec.whatwg.org/multipage/forms.html#autofocusing-a-form-control:-the-autofocus-attribute … applies, I think +@bdc
5:14 AM - 22 Dec 2016
0 replies
0 retweets
0 likes
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.