Document: rootElement プロパティ

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

Document.rootElementElement を返します。これは <svg> 要素の場合は document のルート要素で、それ以外の場合は null です。これはすべてのルート要素を返す Document.documentElement に置き換えられて非推奨になりました。

<svg> 要素の場合は document のルート要素で、それ以外の場合は null です。

文書が空ではない SVG 要素の場合、rootElementSVGSVGElement となり、 documentElement と同じものになります。

仕様書

Specification
Scalable Vector Graphics (SVG) 2
# __svg__SVGDocument__rootElement

ブラウザーの互換性

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

Legend

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

Full support
Full support
Deprecated. Not for use in new websites.