Sets the browser action's title. The title is displayed in a tooltip over the browser action's icon. You can pass a tabId in as an optional parameter — if you do this then the title is changed only for the given tab. Tabs without a specific title will inherit the global title text, which defaults to the default_title or name specified in the manifest.


  details // object


object. The new title and optionally the ID of the tab to target.

string or null. The string the browser action should display when moused over.

Use an empty string - "" - if you don't want any title.

If a tabId is specified, null removes the tab-specific title so that the tab inherits the global title. Otherwise it reverts the global title to the default value.


integer. Sets the title only for the given tab. If omitted, the global title is set instead.

The title is reset automatically when the tab is closed.

Browser compatibility

ChromeEdgeFirefoxFirefox for AndroidOpera
Basic support Yes154555 Yes
The title property of the details parameter can be set to null. No No59 No No


This code switches the title between "this" and "that" each time the user clicks the browser action:

function toggleTitle(title) {
  if (title == "this") {
    browser.browserAction.setTitle({title: "that"});
  } else {
    browser.browserAction.setTitle({title: "this"});

browser.browserAction.onClicked.addListener(() => {
  var gettingTitle = browser.browserAction.getTitle({});

Example extensions


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: Loirooriol, wbamberg, Makyen, chrisdavidmills
 Last updated by: Loirooriol,