A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://webplatform.github.io/docs/dom/Node/ownerDocument below:

ownerDocument ยท WebPlatform Docs

ownerDocument Summary

Retrieves the document object associated with the node.

Property of dom/Nodedom/Node

Syntax

Note: This property is read-only.

var doc = element.ownerDocument;
Return Value

Returns an object of type DOM NodeDOM Node

The document Node of the web page or iframe or frame.

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.

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

var doc = p.ownerDocument;
alert(doc.outerHTML);
var html = doc.documentElement;
alert(html.outerHTML);
Usage
 Used to build the DOM tree of documents that contain <iframe>, <frame> and <frameset> elements.
Notes Remarks

The ownerDocument is the Document object that is used to create new nodes. This property returns null when the node is a Document. ownerDocument was introduced in Microsoft Internet Explorer 6.

Syntax

var doc=element.ownerDocument;

Related specifications
DOM Level 2 Core
Recommendation
Attributions

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4