- From: Jordan Brennan <notifications@github.com>
- Date: Thu, 11 May 2023 10:52:52 -0700
- To: whatwg/dom <dom@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Thursday, 11 May 2023 17:52:57 UTC
I recently discovered `document.all` in an effort to find more direct ways of referencing elements with an id attribute, like `window.myElementId` apparently works. Anyway, I was disappointed to read that `document.all` is deprecated (https://developer.mozilla.org/en-US/docs/Web/API/Document/all) despite being supported by all current versions of major browsers. I'm not sure of any costs or legitimate issues with using `document.all`, but the DX is awesome: ``` <span id="welcomeMessage" hidden>Welcome!</span> document.all.welcomeMessage.hidden = false; document.getElementById('welcomeMessage').hidden = false; ``` What's the harm with un-deprecating this property? -- Reply to this email directly or view it on GitHub: https://github.com/whatwg/dom/issues/1196 You are receiving this because you are subscribed to this thread. Message ID: <whatwg/dom/issues/1196@github.com>
Received on Thursday, 11 May 2023 17:52:57 UTC