@AndyRay, why would I close it? If you want to answer it go ahead. It's better if you have references.
–
Matthew FlaschenJan 18 '13 at 21:22

1

@AndyRay, no, you didn't. Apparently you're not familiar with the difference between a comment and answer on Stack Overflow.
–
Matthew FlaschenJan 18 '13 at 21:25

1

I had a look at the specification... all it says is that the operators return true if x and y are the same object. But this does not imply that various DOM methods must return references to the same DOM node so that they can be considered equal in JS. I didn't find anything in this regard in the DOM spec either.
–
Felix KlingJan 18 '13 at 21:48

1 Answer
1

Yes, those equality operators will work as defined by the ECMAScript standard.

One word of caution, == often does things that developers do not expect, such as casting to a string when compared to a string value. This would make the following statement true, although it might not be the desired result: