observerService.addObserver(observer,"domwindowopened",true);
observer seems undeclared? Also, the implementation that your original posting showed did not support weak references... so you should probably pass false as the third argument.
smime.p7s
Description: S/MIME Cryptographic Signature
