HTML DOM Element ownerDocument property
- Forrige side outerText
- Næste side parentNode
- Gå tilbage til niveauet over HTML DOM Elements objekt
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
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 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 |
- Forrige side outerText
- Næste side parentNode
- Gå tilbage til niveauet over HTML DOM Elements objekt