Document: all property
Deprecated
Avoid using this feature in new projects. This feature may be a candidate for removal from web standards or browsers.>
The Document interface's read-only all property returns an HTMLAllCollection rooted at the document node.
Rather than using document.all to return an HTMLAllCollection of all the document's elements in document order, you can use Document.querySelectorAll to return a NodeList of all the document's elements in document order:
js
const allElements = document.querySelectorAll("*");
Value
An HTMLAllCollection which contains every element in the document.
Specifications
| Specification |
|---|
| HTML> # dom-document-all> |