HTML DOM Element isEqualNode()
HTML DOM Element isEqualNode() Method
The isEqualNode() is used to return true if two elements are equal or two nodes are equal. They are equal if:
- They have the same nodeName
- They have the same nodeValue
- They have the same nodeType
- They have the same nameSpaceURI
- They have the same localName and prefix
- They have the same attributes and attribute values
- They have the same childNodes with all the descendants
Syntax:-
Its syntax is:- element.isEqualNode(node) OR node.isEqualNode(node)
Return:-
Its return is:- true if nodes are equal else false
Further Explanation:-
Parameter | Description |
node | Required. The node to compare. |