Closed
Bug 1466347
Opened 6 years ago
Closed 6 years ago
In moz-extension:// page and its iframes, window.open() always returns null
Categories
(WebExtensions :: General, defect)
Tracking
(Not tracked)
RESOLVED
INVALID
People
(Reporter: CoolCmd, Unassigned)
References
Details
Attachments
(1 file)
1.11 KB,
application/zip
|
Details |
User Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:60.0) Gecko/20100101 Firefox/60.0 Build ID: 20180516032328 Steps to reproduce: 1. navigate to moz-extension://id/ext-page.html 2. ext-page.html contains <iframe src="http://example.com/web-page.html"> 3. both ext-page.html and web-page.html runs window.open("http://example.com/popup.html") Actual results: popup windows are opened, but in both cases window.open() returns null Expected results: window.open() should return the object. this is especially important for iframe, because it does not have access to WebExtension API and is not designed to workaround this bug.
Comment 1•6 years ago
|
||
You didn't include a complete example, presumably this is the standard popup blocking behavior. If you think this is soemthing else, feel free to re-open and include more detail (ie a working extension that illustrates the problem)
Status: UNCONFIRMED → RESOLVED
Closed: 6 years ago
Resolution: --- → DUPLICATE
(In reply to Andrew Swan [:aswan] from comment #1) > You didn't include a complete example, presumably this is the standard popup > blocking behavior. As i said, windows are opened, so this is NOT popup blocker. > If you think this is soemthing else, feel free to re-open And how can i do it? I do not see "REOPEN" button, "Help" dos not help, even Google do not know. > and include more detail (ie a working extension that illustrates the problem) Test case in attach. Install, click and see the F12 console. Browser ignores 2nd parameter and returns null, as if 'noopener' parameter was used.
Flags: needinfo?(aswan)
Comment 4•6 years ago
|
||
By looking at attachment 8984536 [details], it seems to me that window.open is not returning a window object for the opened popup window because the "opener" is a webextension page loaded in a tab (which is running in the extension process when the extension oop mode is enabled) and the opened popup window is a regular webpage (which I guess it is loaded in the content process as it should).
In this case from my point of view this is expected (at least with the current oop architecture, even if it may also be surprising as well):
the popup window is not running in the same process of the page that has called window.open and so that page can't access the window object.
On the contrary, if the extension page calls window.open with another extension url, I would expect it to actually return the window object.
Comment 5•6 years ago
|
||
I believe Luca's explanation is correct.
Flags: needinfo?(aswan)
Resolution: DUPLICATE → INVALID
Updated•6 years ago
|
Product: Toolkit → WebExtensions
You need to log in
before you can comment on or make changes to this bug.
Description
•