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/isSameNode below:

isSameNode ยท WebPlatform Docs

isSameNode Summary

Determines if two nodes are the same node.

Method of dom/Nodedom/Node

Syntax
var isSame = node.isSameNode();
Parameters otherNode
Data-type
DOM Node

The node to be compared to the node that is executing the method.

Return Value

Returns an object of type BooleanBoolean

Whether the node specified in the otherNode parameter refers to the same node.

Examples

In the following example isSameNode is false since document.body is the body node while document.documentElement is the html node.

var isSameNode = document.body..isSameNode(document.documentElement);
Usage
 This determines whether or not two references refer to the same node.  If the references refer to the same node, you can use the references interchangeably, even when using a proxy.
Notes

Obsolete This feature is obsolete. Although it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it. In browsers where isSameNode is no longer supported // Instead of using node1.isSameNode(node2)

// use node1 Template:=== node2 // or node1 Template:== node2

Related specifications
DOM Level 3 Core
Recommendation
DOM Level 4 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