User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1612.2 Safari/537.36 Steps to reproduce: Calling window.opener from a window that has been opened via window.open() returns null. - You can try opening this page: http://www.w3schools.com/js/tryit.asp?filename=try_win_opener - Change the line to *** myWindow.document.write(window.opener); *** You can try any other combo, like parent.window.opener, top.opener, etc and it doesn't work. Actual results: The popup window says "null." Expected results: It should say [object Window].
OS: Mac OS X → Windows 7
Hardware: x86 → x86_64
Created attachment 800939 [details] parent.html Both the parent.html testcase and the example at w3schools.com works for me. What version of firefox was this tested on? And doesn't the testcase work for you?
Your test files worked for me. I think that I'm running into security issues or something because I am trying to detect whether a window is a popup (has an opener) using a FF extension.
I'm following up on this bug. Indeed, FF extensions need to use an XPCNativeWrapper to access or detect the opener. Otherwise, it returns null. I got it working using this method.
Status: UNCONFIRMED → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.