iirc this doesn't work in Firefox? or at least it doesn't work the same way as in Chrome. I developed a tiny home-cooked app[0] that depended on this behavior using desktop Chrome which then broke when I tried to use it on mobile Firefox. I then switched it to using
document.getElementById
like I should have and everything worked fine. Like others in this thread, I recommend not relying on this behavior.