Document: rootElement 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.
Document.rootElement trả về Element
là phần tử gốc của document nếu nó là một phần tử <svg>, ngược lại là null. Thuộc tính này không được dùng nữa mà thay thế bằng Document.documentElement, trả về phần tử gốc cho tất cả tài liệu.
Giá trị
Đối với các phần tử SVG, Element là phần tử gốc của document; ngược lại là null.
Nếu tài liệu là một tài liệu SVG không rỗng, thì rootElement sẽ là một SVGSVGElement, giống hệt documentElement.
Đặc tả kỹ thuật
| Specification |
|---|
| Scalable Vector Graphics (SVG) 2> # __svg__SVGDocument__rootElement> |