Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

browserAction.getPopup()

Gets the HTML document set as the popup for this browser action.

Syntax

chrome.browserAction.getPopup(
  details,               // object
  function(result) {...} // function
)

This API is also available as browser.browserAction.getPopup() in a version that returns a promise.

Parameters

details
object.
tabIdOptional
integer. The tab whose popup to get. If no tab is specified, the non-tab-specific popup is returned.
callback
function. The function is passed the following arguments:
result
string. The URL for the popup's document. This will be a fully qualifed URL, such as moz-extension://d1d8a2eb-fe60-f646-af30-a866c5b39942/popups/popup2.html.

Browser compatibility

Chrome Edge Firefox Firefox for Android Opera
Basic support Yes No 45.0 No 33

Examples

Get the popup's URL:

function gotPopup(popupURL) {
  console.log(popupURL)
}

chrome.browserAction.getPopup({}, gotPopup);

Acknowledgements

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

Microsoft Edge compatibility data is supplied by Microsoft Corporation and is included here under the Creative Commons Attribution 3.0 United States License.

Document Tags and Contributors

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