Determines whether two nodes are equal in their type, name and namespace.
Syntaxvar isEqual = node.isEqualNode();
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 is equal to the current node.
ExamplesIn the follow example if #targetElm is the first div element of the document ‘true’ will be displayed.
var targetElm = document.getElementById("targetElm");
var firstDiv = document.getElementsByTagName("div")[0];
alert( targetElm.isEqualNode(firstDiv) );
Usage
This method determines whether or not two nodes are equal. Nodes are considered equal when the values of the following attributes are equal:
Notes
Nodes can be equal without being the same. Use isSameNode to determine if two nodes are the same.
Related specificationsMozilla Developer Network : [Node.isEqual Article]
Microsoft Developer Network: [isEqualNode 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