tabGroups
This API enables extensions to modify and rearrangetab groups.
Tab groups may persist across browser restarts as part of session restore. Tab groups in private browsing windows do not persist across restarts. When a tab group is restored, itsgroupId may differ from its original value.
ThetabGroups API doesn't offer the ability to create or remove tab groups. Use thetabs.group() andtabs.ungroup() methods instead. To query the position of a tab group within a window, usetabs.query(). These APIs in thetabs namespace don't require any permissions.
In this article
Permissions
To use this API, an extension must request the"tabGroups"permission in itsmanifest.json file. The"tabGroups" permission is not shown to users in permission prompts.
Types
tabGroups.ColorThe color of a tab group.
tabGroups.TabGroupThe state of a tab group.
Properties
tabGroups.TAB_GROUP_ID_NONEThe tab group ID value returned when a tab isn't in a tab group.
Functions
tabGroups.get()Returns details about a tab group.
tabGroups.move()Moves a tab group within or to another window.
tabGroups.query()Returns all tab groups or finds tab groups with certain properties.
tabGroups.update()Modifies the state of a tab group.
Events
tabGroups.onCreatedFires when a tab group is created.
tabGroups.onMovedFires when a tab group is moved within a window or to another window.
tabGroups.onRemovedFires when a tab group is removed.
tabGroups.onUpdatedFires when a tab group is updated.