{"id":9228,"date":"2025-04-30T16:38:20","date_gmt":"2025-04-30T23:38:20","guid":{"rendered":"https:\/\/blog.mozilla.org\/addons\/?p=9228"},"modified":"2025-04-30T17:30:51","modified_gmt":"2025-05-01T00:30:51","slug":"webextensions-support-for-tab-groups","status":"publish","type":"post","link":"https:\/\/blog.mozilla.org\/addons\/2025\/04\/30\/webextensions-support-for-tab-groups\/","title":{"rendered":"WebExtensions Support for Tab Groups"},"content":{"rendered":"<p>Exciting news: with yesterday\u2019s release of Firefox 138, <a href=\"https:\/\/blog.mozilla.org\/en\/firefox\/firefox-tab-groups\/\">tab groups are now available<\/a> to all users! Tab groups have been <a href=\"https:\/\/blog.mozilla.org\/en\/firefox\/tab-groups-community\/\">a long standing feature request<\/a> for users, so it\u2019s wonderful to see this go out to everyone.<\/p>\n<p>New browser features are great, but what\u2019s even better is when they\u2019re backed by WebExtensions APIs that allow our amazing developer community to deeply integrate with those features. So, without further ado, let\u2019s get into the new capabilities available in this release.<\/p>\n<h2>What\u2019s new in 138<\/h2>\n<p><a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Mozilla\/Firefox\/Releases\/138#changes_for_add-on_developers\">Firefox 138<\/a> includes initial support for tab group management in WebExtensions APIs. More specifically, we\u2019ve updated the Tabs API with a few new tricks that allow extension developers to create tab groups, modify a group\u2019s membership, and ungroup tabs:<\/p>\n<ul>\n<li aria-level=\"1\"><code>tabs.group()<\/code> creates a new tab group that contains the specified tab(s) (<a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Mozilla\/Add-ons\/WebExtensions\/API\/tabs\/group\">MDN<\/a>, <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=1959714\">bug 1959714<\/a>)<\/li>\n<li aria-level=\"1\"><code>tabs.ungroup()<\/code> remove the specified tab(s) from their associated tab groups (<a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Mozilla\/Add-ons\/WebExtensions\/API\/tabs\/ungroup\">MDN<\/a>, <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=1959714\">bug 1959714<\/a>)<\/li>\n<li><code>tabs.query()<\/code> can now be used to query for tabs with a given groupId (<a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Mozilla\/Add-ons\/WebExtensions\/API\/tabs\/query#groupid\">MDN<\/a>, <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=1959715\">bug 1959715<\/a>)<\/li>\n<li aria-level=\"1\"><code>Tab<\/code> objects now have a <code>groupId<\/code> property that identifies which group it\u2019s in (if any) (<a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Mozilla\/Add-ons\/WebExtensions\/API\/tabs\/Tab#groupid\">MDN<\/a>, <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=1959713\">bug 1959713<\/a>)<\/li>\n<li aria-level=\"1\">The <code>tabs.onUpdated<\/code> event now emits updates for tab group membership changes (<a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Mozilla\/Add-ons\/WebExtensions\/API\/tabs\/onUpdated\">MDN<\/a>, <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=1959716\">bug 1959716<\/a>)<\/li>\n<\/ul>\n<h2>Best practices<\/h2>\n<p>As we learn more about how users interact with Tab Groups and how extensions integrate Tab Groups into their features, we\u2019ll build out and expand on suggestions to help Add-on developers create better interactions for users. Here\u2019s some suggestions we have so far.<\/p>\n<h3>Moving tabs<\/h3>\n<p>Be aware that changing a tab\u2019s position in the tab strip may change its group membership, and that your users may not expect that moving tabs using your add-on will move tabs in or out of their tab groups. Use the <code>groupId<\/code> property on <code>Tab<\/code> instances to ensure that the tab is or is not grouped as expected.<\/p>\n<h3>Reorganizing tabs<\/h3>\n<p>Take tab groups into consideration when organizing tabs. For example, <a href=\"https:\/\/addons.mozilla.org\/en-US\/firefox\/addon\/multi-account-containers\/\">Firefox Multi-Account Containers<\/a> has a &#8220;sort tabs by container&#8221; feature that reorganizes tabs so that tabs in the same container are grouped together. Since moving a tab can change its group membership, this could have unexpected consequences for users. To avoid this destructive operation, the add-on <a href=\"https:\/\/github.com\/mozilla\/multi-account-containers\/pull\/2753\">was updated<\/a> to skip over grouped tabs.<\/p>\n<p>To avoid destructive changes to a user\u2019s tab groups, we recommend reorganizing ungrouped tabs or tabs inside a window\u2019s tab groups as opposed to organizing all tabs within a window.<\/p>\n<h2>What\u2019s coming<\/h2>\n<p>In addition to the features added in 138, we are also looking to further expand tab group support with the introduction of the Tab Groups API in Firefox 139. This will address a few gaps in our tab group supporting including the ability to:<\/p>\n<ul>\n<li aria-level=\"1\">set a tab group\u2019s title, color, and collapsed state (<code>tabGroups.update()<\/code>)<\/li>\n<li aria-level=\"1\">move an entire tab group (<code>tabGroups.move()<\/code>)<\/li>\n<li aria-level=\"1\">get info about a single tab group (<code>tabGroups.get()<\/code>)<\/li>\n<li aria-level=\"1\">get info about all tab groups (<code>tabGroups.query()<\/code>)<\/li>\n<li aria-level=\"1\">subscribe to specific tab group events (<code>onUpdated<\/code>, <code>onMoved<\/code>, <code>onCreated<\/code>, <code>onRemoved<\/code>)<\/li>\n<\/ul>\n<p>We\u2019ve already landed the initial implementation of this API in <a href=\"https:\/\/www.mozilla.org\/en-US\/firefox\/beta\/notes\/\">Firefox 139 Beta<\/a>, but we\u2019d love to get feedback on the API design and capabilities from our development community. If you\u2019re feeling adventurous, you can start experimenting with these new capabilities and sharing feedback with us today. We encourage you to share your experiences and thoughts with us on <a href=\"https:\/\/discourse.mozilla.org\/c\/add-ons\/35\">Discourse<\/a>.<\/p>\n<p>If everything proceeds smoothly during the next beta cycle, we anticipate that the Tab Groups API will be available with the release of Firefox 139. We look forward to seeing what you build!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Exciting news: with yesterday\u2019s release of Firefox 138, tab groups are now available to all users! Tab groups have been a long standing feature request for users, so it\u2019s wonderful &hellip; <a class=\"go\" href=\"https:\/\/blog.mozilla.org\/addons\/2025\/04\/30\/webextensions-support-for-tab-groups\/\">Read more<\/a><\/p>\n","protected":false},"author":1949,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[388,44,278886],"tags":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v22.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>WebExtensions Support for Tab Groups - Mozilla Add-ons Community Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/blog.mozilla.org\/addons\/2025\/04\/30\/webextensions-support-for-tab-groups\/\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Simeon Vincent\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/blog.mozilla.org\/addons\/2025\/04\/30\/webextensions-support-for-tab-groups\/\",\"url\":\"https:\/\/blog.mozilla.org\/addons\/2025\/04\/30\/webextensions-support-for-tab-groups\/\",\"name\":\"WebExtensions Support for Tab Groups - Mozilla Add-ons Community Blog\",\"isPartOf\":{\"@id\":\"https:\/\/blog.mozilla.org\/addons\/#website\"},\"datePublished\":\"2025-04-30T23:38:20+00:00\",\"dateModified\":\"2025-05-01T00:30:51+00:00\",\"author\":{\"@id\":\"https:\/\/blog.mozilla.org\/addons\/#\/schema\/person\/9a6a45085e75a9d256a6cfc30ebb3ea7\"},\"breadcrumb\":{\"@id\":\"https:\/\/blog.mozilla.org\/addons\/2025\/04\/30\/webextensions-support-for-tab-groups\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/blog.mozilla.org\/addons\/2025\/04\/30\/webextensions-support-for-tab-groups\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/blog.mozilla.org\/addons\/2025\/04\/30\/webextensions-support-for-tab-groups\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/blog.mozilla.org\/addons\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"WebExtensions Support for Tab Groups\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/blog.mozilla.org\/addons\/#website\",\"url\":\"https:\/\/blog.mozilla.org\/addons\/\",\"name\":\"Mozilla Add-ons Community Blog\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/blog.mozilla.org\/addons\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/blog.mozilla.org\/addons\/#\/schema\/person\/9a6a45085e75a9d256a6cfc30ebb3ea7\",\"name\":\"Simeon Vincent\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/blog.mozilla.org\/addons\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/c4223cdca3b1581e62ae8235a42610a8?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/c4223cdca3b1581e62ae8235a42610a8?s=96&d=mm&r=g\",\"caption\":\"Simeon Vincent\"},\"url\":\"https:\/\/blog.mozilla.org\/addons\/author\/svincentmozilla-com\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"WebExtensions Support for Tab Groups - Mozilla Add-ons Community Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/blog.mozilla.org\/addons\/2025\/04\/30\/webextensions-support-for-tab-groups\/","twitter_misc":{"Written by":"Simeon Vincent","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/blog.mozilla.org\/addons\/2025\/04\/30\/webextensions-support-for-tab-groups\/","url":"https:\/\/blog.mozilla.org\/addons\/2025\/04\/30\/webextensions-support-for-tab-groups\/","name":"WebExtensions Support for Tab Groups - Mozilla Add-ons Community Blog","isPartOf":{"@id":"https:\/\/blog.mozilla.org\/addons\/#website"},"datePublished":"2025-04-30T23:38:20+00:00","dateModified":"2025-05-01T00:30:51+00:00","author":{"@id":"https:\/\/blog.mozilla.org\/addons\/#\/schema\/person\/9a6a45085e75a9d256a6cfc30ebb3ea7"},"breadcrumb":{"@id":"https:\/\/blog.mozilla.org\/addons\/2025\/04\/30\/webextensions-support-for-tab-groups\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/blog.mozilla.org\/addons\/2025\/04\/30\/webextensions-support-for-tab-groups\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/blog.mozilla.org\/addons\/2025\/04\/30\/webextensions-support-for-tab-groups\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/blog.mozilla.org\/addons\/"},{"@type":"ListItem","position":2,"name":"WebExtensions Support for Tab Groups"}]},{"@type":"WebSite","@id":"https:\/\/blog.mozilla.org\/addons\/#website","url":"https:\/\/blog.mozilla.org\/addons\/","name":"Mozilla Add-ons Community Blog","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/blog.mozilla.org\/addons\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/blog.mozilla.org\/addons\/#\/schema\/person\/9a6a45085e75a9d256a6cfc30ebb3ea7","name":"Simeon Vincent","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/blog.mozilla.org\/addons\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/c4223cdca3b1581e62ae8235a42610a8?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/c4223cdca3b1581e62ae8235a42610a8?s=96&d=mm&r=g","caption":"Simeon Vincent"},"url":"https:\/\/blog.mozilla.org\/addons\/author\/svincentmozilla-com\/"}]}},"_links":{"self":[{"href":"https:\/\/blog.mozilla.org\/addons\/wp-json\/wp\/v2\/posts\/9228"}],"collection":[{"href":"https:\/\/blog.mozilla.org\/addons\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.mozilla.org\/addons\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.mozilla.org\/addons\/wp-json\/wp\/v2\/users\/1949"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.mozilla.org\/addons\/wp-json\/wp\/v2\/comments?post=9228"}],"version-history":[{"count":0,"href":"https:\/\/blog.mozilla.org\/addons\/wp-json\/wp\/v2\/posts\/9228\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.mozilla.org\/addons\/wp-json\/wp\/v2\/media?parent=9228"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.mozilla.org\/addons\/wp-json\/wp\/v2\/categories?post=9228"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.mozilla.org\/addons\/wp-json\/wp\/v2\/tags?post=9228"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}