GO-Ve01
ServicesDevelopersBooksDictionaryPapersWikidataEncyclopediaSearchBabelCareersDeck

pageAction.openPopup()

Open the page action's popup.

Open the page action's popup.

You can only call this function from inside the handler for a [user action](/docs/Mozilla/Add-ons/WebExtensions/User_actions).

## Syntax

```js-nolint
browser.pageAction.openPopup()
```

### Parameters

None.

### Return value

A [`Promise`](/docs/Web/JavaScript/Reference/Global_Objects/Promise) that is resolved with no arguments.

## Examples

Open the popup when the user selects a context menu item:

```js
browser.menus.create({
id: "open-popup",
title: "open popup",
contexts: ["all"],
});

browser.menus.onClicked.addListener(() => {
browser.pageAction.openPopup();
});
```

## Browser compatibility

source: MDN Web Docs mirror · page

Cite this

"pageAction.openPopup()". MDN Web Docs. CC BY-SA 2.5 (MDN). https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/pageAction/openPopup

JSON record · API collection · BibTeX · RIS · CSL-JSON · citation policy

Save to pass ·