JavaScript DOM HTML method: isEqualNode()
[this page | pdf | back links]
The isEqualNode() method (when applied to HTML elements
in the JavaScript
DOM) returns true if two elements / nodes are
‘equal’, otherwise returns false.
Two nodes are deemed ‘equal’ if all the following are true, namely that they
have the same:
-
Node type
-
nodeName, nodeValue, localName, namespaceURI and prefix
-
childNodes (including all descendants)
-
same attributes and attribute values (although the attributes do not
need to be in the same order)
It
has the following syntax with the following parameters. It returns a Boolean
as above.
element.isEqualNode(node)
Parameter
|
Required / Optional
|
Description
|
node
|
Required
|
Node object which is
compared to the element (method can also be applied to a node object)
|
NAVIGATION LINKS
Contents | Prev | Next | JavaScript DOM (and BOM)