browserAction.getBadgeText()

Gets the browser action's badge text.

Syntax

browser.browserAction.getBadgeText(
  details,               // object
  function(result) {...} // function
)

Parameters

details
object.
tabIdOptional
integer. Specify the tab to get the badge text from. If no tab is specified, the non-tab-specific badge text is returned.
callback
function. The function is passed the following arguments:
result
string. The badge text.

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,