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

isEqualNode · WebPlatform Docs

isEqualNode Summary

Determines whether two nodes are equal in their type, name and namespace.

Method of dom/Nodedom/Node

Syntax
var isEqual = node.isEqualNode();
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 is equal to the current node.

Examples

In 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 specifications
DOM Level 3 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