browserAction.setPopup()

Sets the HTML document that will be opened as a popup when the user clicks on the browser action's icon.

Syntax

browser.browserAction.setPopup(
  details // object
)

Parameters

details
object.
tabIdOptional
integer. Sets the popup only for a specific tab.
popup
string. The HTML file to show in a popup, specified as a URL.
This can point to a file packaged within the extension (for example, created using extension.getURL) or point to a remote document (e.g. "https://example.org/"). If set to the empty string (""), no popup is shown.

Browser compatibility

EdgeFirefoxChromeOpera
Basic support?45.0Yes33
Firefox
Basic supportNo

Examples

Acknowledgements

This API is based on Chromium's chrome.browserAction API. This documentation is derived from browser_action.json in the Chromium code.

Document Tags and Contributors

 Contributors to this page: wbamberg
 Last updated by: wbamberg,