HTML DOM Element ownerDocument property
- Previous page outerText
- Next page parentNode
- Go up one level HTML DOM Elements object
Definition and usage
ownerDocument
The property returns the owner document of the node, as a Document object.
In HTML, the HTML document itself is always the ownerDocument of the element.
Please visit our Document object reference manual Read more about the Document object in the documentation.
Example
Get the node type of the owner document of the <p> element:
var x = document.getElementById("myP").ownerDocument.nodeType;
Syntax
node.ownerDocument
Technical details
Return value: | Return the owner document of the node with the Document object. |
---|---|
DOM version: | Core Level 2 Node Object |
Browser support
Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|
Chrome | Edge | Firefox | Safari | Opera |
Support | Support | Support | Support | Support |
- Previous page outerText
- Next page parentNode
- Go up one level HTML DOM Elements object