mozilla

Node.isEqualNode Redirect 1

Summary

Tests whether two nodes are equal.

Syntax

var isEqualNode = node.isEqualNode(arg);
  • arg: The node to compare equality with.

Example

If #targetElm is first div element in document, "true" will be displayed.

var targetElm = document.getElementById("targetElm");
var firstDiv = document.getElementsByTagName("div")[0];

alert( targetElm.isEqualNode(firstDiv) );

Specification

Document Tags and Contributors

Contributors to this page: Sheppy
Last updated by: Sheppy,