browserAction.setBadgeBackgroundColor()

Sets the background color for the badge.

Syntax

browser.browserAction.setBadgeBackgroundColor(
  details // object
)

Parameters

details
object.
color
string or browserAction.ColorArray. The color, specified as one of:
tabIdOptional
integer. Sets the badge background color only for the given tab.

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,