Hacker News new | ask | show | jobs
by onetom 856 days ago
I've also noticed this a few years ago, but where is this documented? Was it already the case in IE6 for example? Have you found any definitive source, which states this behaviour?
2 comments

The relevant WHATWG specification: https://html.spec.whatwg.org/multipage/nav-history-apis.html...

It was said to be introduced in MSIE 4 or around and then eventually standardized by WHATWG (because `window` was never formally specified before that point, AFAIK): https://stackoverflow.com/questions/9740275/html-element-id-...

HTML Spec:

> 7.2.2.3 Named access on the Window object

> window[name]

> Returns the indicated element or collection of elements.

https://html.spec.whatwg.org/multipage/nav-history-apis.html...