Movatterモバイル変換


[0]ホーム

URL:


  1. Mozilla
  2. Add-ons
  3. Browser extensions
  4. JavaScript APIs
  5. tabGroups
  6. tabGroups.onRemoved

tabGroups.onRemoved

Fires when a tab group is removed. This occurs 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

js
browser.tabGroups.onRemoved.addListener(listener)browser.tabGroups.onRemoved.removeListener(listener)browser.tabGroups.onRemoved.hasListener(listener)

Events have three functions:

addListener(listener)

Adds a listener to this event.

removeListener(listener)

Stops listening to this event. Thelistener argument is the listener to remove.

hasListener(listener)

Checks whetherlistener is registered for this event. Returnstrue if it is listening,false otherwise.

addListener syntax

Parameters

listener

The function called when this event occurs. The function is passed this argument:

group

tabGroups.TabGroup. Details of the removed tab group's state.

removeInfo

object. Information on why the tab group is closing.

isWindowClosing

boolean.true if the tab group is removed because its window is closing.

Examples

Listen for and log tab group removals:

js
function tabGroupRemoved(group) {  console.log(`Tab group with ID ${group.id} was removed.`);}browser.tabGroups.onRemoved.addListener(tabGroupRemoved);

Browser compatibility

Help improve MDN

Learn how to contribute

This page was last modified on byMDN contributors.


[8]ページ先頭

©2009-2025 Movatter.jp