TOC PREV NEXT INDEX

Put your logo here!


ownerDocument


The ownerDocument property returns the top-level document object for this node.

Syntax

document = element.ownerDocument 

Parameters

document is the document object parent of the current element.

Example

// given a node "p", get the top-level HTML child 
// of the document object 
d = p.ownerDocument; 
htm = p.documentElement; 

Notes

The document object returned by this property is the main object with which all the child nodes in the actual HTML document are created.

If this property is used on a node that is itself a document, the result is NULL.

Specification

DOM Level 2 - Core


mozilla.org | mailto:oeschger | bug 93108
TOC PREV NEXT INDEX