title | short-title | slug | l10n | ||
---|---|---|---|---|---|
Document: rootElement プロパティ |
rootElement |
Web/API/Document/rootElement |
|
{{ApiRef("DOM")}}{{Deprecated_header}}
Document.rootElement
は {{domxref("Element")}} を返します。これは
{{SVGElement("svg")}} 要素の場合は {{domxref("document")}} のルート要素で、それ以外の場合は null
です。これはすべてのルート要素を返す {{domxref("Document.documentElement")}} に置き換えられて非推奨になりました。
{{SVGElement("svg")}} 要素の場合は {{domxref("document")}} のルート要素で、それ以外の場合は null
です。
文書が空ではない SVG 要素の場合、rootElement
は {{domxref("SVGSVGElement")}} となり、 documentElement
と同じものになります。
{{Specifications}}
{{Compat}}