-
Notifications
You must be signed in to change notification settings - Fork 72
Open
Labels
needs-triage: chromeChrome needs to assess this issue for the first timeChrome needs to assess this issue for the first timeneeds-triage: firefoxFirefox needs to assess this issue for the first timeFirefox needs to assess this issue for the first timeneeds-triage: safariSafari needs to assess this issue for the first timeSafari needs to assess this issue for the first time
Description
The web platform spec says that menubar.visible can be used by the script running in a window to tell the window is a popup and it is indeed so for popup windows created with window.open('', '_blank', 'popup=1'), but not so for chrome.windows.create({url: '...', type: 'popup'}).
Both Chrome and Firefox fail the test.
If the consensus will be not to fix it, the difference should be explicitly stated in the documentation.
The workarounds I see are:
- outside: when creating, add a dummy URL parameter/hash in create() and check
locationinside; - inside: call an asynchronous
(await browser.windows.getCurrent()).typewhich can't be used in a synchronous context like a beforeunload listener that conditionally prompts the user to save the changes. We can use it at the beginning of popup initialization of course but theoretically the user may try to close the popup before the call succeeds.
carlosjeurissen
Metadata
Metadata
Assignees
Labels
needs-triage: chromeChrome needs to assess this issue for the first timeChrome needs to assess this issue for the first timeneeds-triage: firefoxFirefox needs to assess this issue for the first timeFirefox needs to assess this issue for the first timeneeds-triage: safariSafari needs to assess this issue for the first timeSafari needs to assess this issue for the first time