I'm creating a FF extension that needs to detect whether a window was opened 
via javascript with the window.open() command.  I've tried many different ways: 
window.opener, parent.window.opener, this.opener, etc. and it always returns 
null.

I was also trying it using the code editor here:  
http://www.w3schools.com/js/tryit.asp?filename=try_win_focus   The only way 
that it returned a valid opener object was when I changed the line to:    
myWindow.document.write(myWindow.opener);

However, this implies that you have to know the object reference name in order 
to get the opener, but there is no way that I'm aware of to detect this in a 
loaded website.  Any ideas of how I can reliably detect if a window was opened 
via javascript?
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to