Closed
Bug 913626
Opened 12 years ago
Closed 12 years ago
window.opener always returns null
Categories
(Firefox :: Untriaged, defect)
Tracking
()
RESOLVED
INVALID
People
(Reporter: digitalcre8, Unassigned)
References
()
Details
Attachments
(2 files)
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].
| Reporter | ||
Updated•12 years ago
|
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?
Flags: needinfo?(digitalcre8)
| Reporter | ||
Comment 3•12 years ago
|
||
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.
Flags: needinfo?(digitalcre8)
| Reporter | ||
Comment 4•12 years ago
|
||
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.
| Reporter | ||
Updated•12 years ago
|
Status: UNCONFIRMED → RESOLVED
Closed: 12 years ago
Resolution: --- → INVALID
You need to log in
before you can comment on or make changes to this bug.
Description
•