MDN self-hosted library · e01.org

Document: all property

DOM

Open notebook · 1 cells web-api-instance-property upstream source

DOM

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:

const allElements = document.querySelectorAll("*");

Value

An HTMLAllCollection which contains every element in the document.

Specifications

Browser compatibility