Document: all property

Deprecated: This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the compatibility table at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.

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

Browser compatibility

desktop mobile
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
all
Deprecated
Chrome – Partial support
Chrome 1 – 63 (Release date: 2008-12-11)
footnote Partial support
footnote Only supported for HTMLDocument, not all Document objects.
Chrome – Full support
Chrome 64 (Release date: 2018-01-23)
footnote Full support
Edge – Full support
Edge 12 (Release date: 2015-07-29)
footnote Full support
Firefox – Partial support
Firefox 24 – 69 (Release date: 2013-09-17)
footnote Partial support
footnote Only supported for HTMLDocument, not all Document objects.
Firefox – Full support
Firefox 70 (Release date: 2019-10-22)
footnote Full support
Opera – Partial support
Opera 12.1 – 50 (Release date: 2012-11-20)
footnote Partial support
footnote Only supported for HTMLDocument, not all Document objects.
Opera – Full support
Opera 51 (Release date: 2018-02-07)
footnote Full support
Safari – Partial support
Safari 1 – 1.3 (Release date: 2003-06-23)
footnote Removed in 2 and later
footnote Partial support
footnote Only supported for HTMLDocument, not all Document objects.
Safari – Partial support
Safari 3 – 10.1 (Release date: 2007-10-26)
footnote Partial support
footnote Only supported for HTMLDocument, not all Document objects.
Safari – Full support
Safari 11 (Release date: 2017-09-19)
footnote Full support
Chrome Android – Partial support
Chrome Android 18 – 63 (Release date: 2012-06-27)
footnote Partial support
footnote Only supported for HTMLDocument, not all Document objects.
Chrome Android – Full support
Chrome Android 64 (Release date: 2018-01-23)
footnote Full support
Firefox for Android – Partial support
Firefox for Android 24 – 68 (Release date: 2013-09-17)
footnote Partial support
footnote Only supported for HTMLDocument, not all Document objects.
Firefox for Android – Full support
Firefox for Android 79 (Release date: 2020-07-28)
footnote Full support
Opera Android – Partial support
Opera Android 12.1 – 46 (Release date: 2012-10-09)
footnote Partial support
footnote Only supported for HTMLDocument, not all Document objects.
Opera Android – Full support
Opera Android 47 (Release date: 2018-07-23)
footnote Full support
Safari on iOS – Partial support
Safari on iOS 1 – 10.3 (Release date: 2007-06-29)
footnote Partial support
footnote Only supported for HTMLDocument, not all Document objects.
Safari on iOS – Full support
Safari on iOS 11 (Release date: 2017-09-19)
footnote Full support
Samsung Internet – Partial support
Samsung Internet 1 – 8.2 (Release date: 2013-04-27)
footnote Partial support
footnote Only supported for HTMLDocument, not all Document objects.
Samsung Internet – Full support
Samsung Internet 9 (Release date: 2018-09-15)
footnote Full support
WebView Android – Partial support
WebView Android 4.4 – 63 (Release date: 2013-12-09)
footnote Partial support
footnote Only supported for HTMLDocument, not all Document objects.
WebView Android – Full support
WebView Android 64 (Release date: 2018-01-23)
footnote Full support
WebView on iOS – Partial support
WebView on iOS 1 – 10.3 (Release date: 2007-06-29)
footnote Partial support
footnote Only supported for HTMLDocument, not all Document objects.
WebView on iOS – Full support
WebView on iOS 11 (Release date: 2017-09-19)
footnote Full support

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support
Partial support
Partial support
Deprecated. Not for use in new websites.
Has more compatibility info.