HTML DOM Element ownerDocument property
- Previous Page outerText
- Next Page parentNode
- Go to the Previous 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 an element.
Please visit our Document object reference manual Read more about the Document object in the
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 a node as a 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 to the Previous Level HTML DOM Elements Object