Document:rootElement 属性
Deprecated
Document.rootElement 返回 document 的根元素,如果它是 <svg> 元素,则返回该元素;否则返回 null。它已被弃用,建议采用适用于获取所有文档的根元素的 Document.documentElement 属性。
值
对于 SVG 元素,返回 document 的根元素;否则返回 null。
如果文档是一个非空的 SVG 文档,那么 rootElement 将是与 documentElement 相同的 SVGSVGElement。
规范
| 规范 |
|---|
| Scalable Vector Graphics (SVG) 2> # InterfaceDocumentExtensions> |