We're looking for a user researcher to understand the needs of developers and designers. Is this you or someone you know? Check out the post: https://mzl.la/2IGzdXS

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


document = element.ownerDocument
  • document is the document object parent of the current element.


// given a node "p", get the top-level HTML child 
// of the document object

var d = p.ownerDocument; 
var html = d.documentElement;


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 Status Comment
The definition of 'Node.ownerDocument' in that specification.
Document Object Model (DOM) Level 3 Core Specification
The definition of 'Node.ownerDocument' in that specification.
Obsolete No change
Document Object Model (DOM) Level 2 Core Specification
The definition of 'Node.ownerDocument' in that specification.
Obsolete Initial definition

Browser compatibility

FeatureChromeEdgeFirefoxInternet ExplorerOperaSafari
Basic support Yes12



62 Yes ?
FeatureAndroid webviewChrome for AndroidEdge mobileFirefox for AndroidOpera AndroidiOS SafariSamsung Internet
Basic support Yes Yes Yes



Yes ? Yes

1. The ownerDocument of doctype nodes (that is, nodes for which Node.nodeType is Node. DOCUMENT_TYPE_NODE or 10) is no longer null. Instead, the ownerDocument is the document on which document.implementation.createDocumentType() was called.

2. See MSDN.

Document Tags and Contributors

Last updated by: fscholz,