Skip to content

Addition of the webextensions.api.tabGroups documentation #39370

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 22 commits into from
May 23, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Additional documentation per Chrome
  • Loading branch information
rebloor committed May 5, 2025
commit af5f98eb07e4d7d2e6f392083449b4182c9517a5
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ browser-compat: webextensions.api.tabGroups.onMoved

{{AddonSidebar}}

Fires when a tab group is moved, within a window or to another window.
Fires when a tab group is moved, within a window or to another window. {{WebExtAPIRef("tabs.onMoved")}} also fire for the tabs within the group.

This event doesn't fire when a tab group is moved between windows; instead, the group is removed from one window and created in another (firing {{WebExtAPIRef("tabGroups.onRemoved")}} and {{WebExtAPIRef("tabGroups.onCreated")}}.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
This event doesn't fire when a tab group is moved between windows; instead, the group is removed from one window and created in another (firing {{WebExtAPIRef("tabGroups.onRemoved")}} and {{WebExtAPIRef("tabGroups.onCreated")}}.

This text is copied from Chrome but not true in Firefox.

Relevant discussion in https://issues.chromium.org/issues/414993460#comment8 and the whole bug report in general.


## Syntax

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ browser-compat: webextensions.api.tabGroups.onRemoved

{{AddonSidebar}}

Fires when a tab group is removed.
Fires when a tab group is removed. This can occur when a user closes a tab group or a tab group is closed automatically because another change means it no longer contained any tabs.

## Syntax

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ let updatedTabGroup = await browser.tabGroups.update(
- : `integer` The ID of the tab group to update.

- `updateProperties` {{optional_inline}}
- : An object containing details of the property values to be matched in returned tab groups.
- : An object containing details of the property values to be matched in returned tab groups. Properties that aren't specified aren't modified.
- `collapsed` {{optional_inline}}
- : `boolean` Whether the tab group is collapsed or expanded in the tab strip.
- `color` {{optional_inline}}
Expand Down
Loading