Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
mohamedkhallouq
GitHub Repository: mohamedkhallouq/content
Path: blob/main/files/en-us/mozilla/add-ons/webextensions/api/action/openpopup/index.md
6567 views
---
title: action.openPopup() slug: Mozilla/Add-ons/WebExtensions/API/action/openPopup page-type: webextension-api-function tags: - API - Add-ons - Extensions - Method - Non-standard - Reference - WebExtensions - action - openPopup browser-compat: webextensions.api.action.openPopup
---

{{AddonSidebar()}}

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.

Syntax

browser.action.openPopup()

Parameters

None.

Return value

A Promise that is resolved with no arguments.

Examples

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(); });

{{WebExtExamples}}

Browser compatibility

{{Compat}}