Comment Comment by dphnx `document.all` can be used in this way: <div id="foo"></div> <script> const { foo } = document.all // do something with foo </script> Don't use it though, it's deprecated as well[1].[1]: https://developer.mozilla.org/en-US/docs/Web/API/Document/al... parent dphnx 4 years ago
[1]: https://developer.mozilla.org/en-US/docs/Web/API/Document/al...