Open the browser action's popup.
Note: This API is available in Manifest V3 or higher.
You can only call this function from inside the handler for a user action.
Open the browser action's popup.
Note: This API is available in Manifest V3 or higher.
You can only call this function from inside the handler for a user action.
browser.action.openPopup()
None.
A Promise
that is resolved with no arguments.
Open the popup when the user selects a context menu item:
browser.menus.create({
id: "open-popup",
title: "open popup",
contexts: ["all"],
});
browser.menus.onClicked.addListener(() => {
browser.action.openPopup();
});
Desktop | Mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
Chrome | Edge | Firefox | Internet Explorer | Opera | Safari | WebView Android | Chrome Android | Firefox for Android | Opera Android | Safari on IOS | Samsung Internet | |
openPopup |
88 | 88 |
109User interaction is not required to call this API when theextensions.openPopupWithoutUserGesture.enabled preference is set (bug 1799344).
|
? | 74 | 16 | ? | ? |
109User interaction is not required to call this API when theextensions.openPopupWithoutUserGesture.enabled preference is set (bug 1799344).
|
? | 16 | ? |
© 2005–2023 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/action/openPopup