Determines if two nodes are the same node.
Syntaxvar isSame = node.isSameNode();
Parameters otherNode
The node to be compared to the node that is executing the method.
Return ValueReturns an object of type BooleanBoolean
Whether the node specified in the otherNode parameter refers to the same node.
ExamplesIn 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 specificationsMozilla Developer Network : [Node.isSameNode Article]
Microsoft Developer Network: [isSameNode Method Article]
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