Peter Wilson wrote:
How do I detect if two JS wrapped XPCom Objects refer to the same XPCom object?

For example in Javascript:

anXULElement.previousSibling.nextSibling is not === anXULElement nor is it ==.

The JS wrapper objects refer to a common XPCOM object (in this case the XULELement). How do I check for equality of objects referenced?

It's likely that anXULElement is not a wrapper around the nsIDOMNode interface, and just as with XPCOM in C++, you need to compare the same interface pointer type when checking identity. Try QueryInterfacing to nsISupports on both and see if that helps.


Mike
_______________________________________________
Mozilla-xpcom mailing list
Mozilla-xpcom@mozilla.org
http://mail.mozilla.org/listinfo/mozilla-xpcom

Reply via email to