mozilla

Node.isSameNode()

Obsolete
This feature is obsolete. Although it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it.

The Node.isSameNode() tests whether two nodes are the same, that is if they reference the same object.

Warning: This method is no longer implemented in recent browsers.

// Instead of using
node1.isSameNode(node2)

// use
node1 === node2 // or
node1 == node2

Syntax

var isSameNode = node.isSameNode(other);
  • other The node to test against.

Specifications

Specification Status Comment
DOM
The definition of 'Node' in that specification.
Living Standard Removed from the specification.
Document Object Model (DOM) Level 3 Core Specification
The definition of 'Node.isSameNode()' in that specification.
Recommendation Initial definition.

Browser compatibility

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari
Basic support ? Supported from 1.0 (1.7 or earlier) to 9.0 (9.0).
Removed in 10.0 (10.0)
? ? ?
Feature Android Firefox Mobile (Gecko) IE Mobile Opera Mobile Safari Mobile
Basic support ? Supported from 1.0 (1.0) to 9.0 (9.0).
Removed in 10.0 (10.0)
? ? ?

See also

Document Tags and Contributors

Last updated by: fscholz,