We're looking for a user researcher to understand the needs of developers and designers. Is this you or someone you know? Check out the post: https://mzl.la/2IGzdXS

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

Last updated by: Sheppy,