tabGroups.update

Modifies the state of a tab group.

Syntax

js
let updatedTabGroup = await browser.tabGroups.update(
    groupId,               // integer
    updateProperties       // object
);

Parameters

groupId

integer The ID of the tab group to update.

updateProperties

An object containing details of the properties to update for this tab group. Properties that aren't specified aren't modified.

collapsed Optional

boolean. Whether the tab group is collapsed or expanded in the tab strip. If the active tab is in a group that is collapsed:

  • In Firefox, the tab remains active and only the inactive tabs are collapsed.
  • In Chrome, the active tab is moved to the first tab to the right of the group. If there is no tab to the right of the group, it's moved to the tab immediately to the left of the group.
color Optional

tabGroups.Color. The name of the color to use for the tab group.

title Optional

string. The name of the tab group.

Return value

A Promise fulfilled with a tabGroups.TabGroup object. If the request fails, the promise is rejected with an error message.

Browser compatibility