Firefox Tomorrow

web api instance property

Document: all property

View on MDN ↗

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 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

SpecificationsStandards references are available on the canonical MDN page.

Browser compatibility

Browser compatibilityCompatibility data is available on the canonical MDN page.