If you want to compare two pointers to an element in order to be the same element, just use the comparison operator. This is easy to prove because
document.body === document.body
For example, if I somehow had links to two elements that I did not know:
if (element1 === element2) ...
Delan Azabani Sep 06 '10 at 8:15 2010-09-06 08:15
source share