- From: Darien Maillet Valentine <notifications@github.com>
- Date: Thu, 11 May 2023 12:33:54 -0700
- To: whatwg/dom <dom@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Thursday, 11 May 2023 19:34:00 UTC
The [`document.all` attribute](https://html.spec.whatwg.org/#dom-document-all) and the [`HTMLAllCollection` interface](https://html.spec.whatwg.org/#the-htmlallcollection-interface) are defined by the HTML spec, not the DOM spec. You will likely find more background and history there. The `getElementById` method is safer (it will never return an `HTMLCollection` instead of an `Element`), more robust (consider the collisions that occur for ID values such as “__proto__”, “hasOwnProperty”, or even — given its own indexed access logic — “0”), and far less complicated. -- Reply to this email directly or view it on GitHub: https://github.com/whatwg/dom/issues/1196#issuecomment-1544567248 You are receiving this because you are subscribed to this thread. Message ID: <whatwg/dom/issues/1196/1544567248@github.com>
Received on Thursday, 11 May 2023 19:34:00 UTC