Document: all プロパティ

非推奨;: この機能は非推奨になりました。まだ対応しているブラウザーがあるかもしれませんが、すでに関連するウェブ標準から削除されているか、削除の手続き中であるか、互換性のためだけに残されている可能性があります。使用を避け、できれば既存のコードは更新してください。このページの下部にある互換性一覧表を見て判断してください。この機能は突然動作しなくなる可能性があることに注意してください。

Document インターフェイスの all プロパティは読み取り専用で、この文書ノードをルートとした HTMLAllCollection を返します。

document.all を使用してこの文書内のすべての要素を文書順に HTMLAllCollection で返す代わりに、Document.querySelectorAll を使用してこの文書内のすべての要素を文書順に NodeList で返すことができます。

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

文書のすべてのノードを含む HTMLAllCollection です。

仕様書

Specification
HTML
# dom-document-all

ブラウザーの互換性

Report problems with this compatibility data on GitHub
desktopmobile
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
all
Deprecated

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.