fix for addEventHandler() obj attribute check

- In addEventHandler(), the check to see if the obj argument is valid
doesn't work if the object is in a different window. If obj is in
another
window, it isn't an instance of this window's Object(); it is an
instance of the other window's Object(). (I wasn't aware that they were
different until now.)