An event that caused a muted state change.
A user input action has set/overridden the muted state.
Tab capture started, forcing a muted state change.
An extension, identified by the extensionId field, set the muted state.
Whether the tabs have completed loading.
Event names supported in onUpdated.
The type of window.
Defines how zoom changes are handled, i.e. which entity is responsible for the actual scaling of the page; defaults to automatic.
Zoom changes are handled automatically by the browser.
Overrides the automatic handling of zoom changes. The onZoomChange event will still be dispatched, and it is the responsibility of the extension to listen for this event and manually scale the page. This mode does not support per-origin zooming, and will thus ignore the scope zoom setting and assume per-tab.
Disables all zooming in the tab. The tab will revert to the default zoom level, and all attempted zoom changes will be ignored.
Defines whether zoom changes will persist for the page's origin, or only take effect in this tab; defaults to per-origin when in automatic mode, and per-tab otherwise.
Zoom changes will persist in the zoomed page's origin, i.e. all other tabs navigated to that same origin will be zoomed as well. Moreover, per-origin zoom changes are saved with the origin, meaning that when navigating to other pages in the same origin, they will all be zoomed to the same zoom factor. The per-origin scope is only available in the automatic mode.
Zoom changes only take effect in this tab, and zoom changes in other tabs will not affect the zooming of this tab. Also, per-tab zoom changes are reset on navigation; navigating a tab will always load pages with their per-origin zoom factors.
ConstonFires when the active tab in a window changes. Note that the tab's URL may not be set at the time this event fired, but you can listen to onUpdated events to be notified when a URL is set.
ConstonFired when a tab is attached to a window, for example because it was moved between windows.
ConstonFired when a tab is created. Note that the tab's URL may not be set at the time this event fired, but you can listen to onUpdated events to be notified when a URL is set.
ConstonFired when a tab is detached from a window, for example because it is being moved between windows.
ConstonFired when the highlighted or selected tabs in a window changes.
ConstonFired when a tab is moved within a window. Only one move event is fired, representing the tab the user directly moved. Move events are not fired for the other tabs that must move in response. This event is not fired when a tab is moved between windows. For that, see tabs.onDetached.
ConstonFired when a tab is closed.
ConstonFired when a tab is replaced with another tab due to prerendering or instant.
ConstonFired when a tab is updated.
ConstonFired when a tab is zoomed.
ConstTAB_An ID which represents the absence of a browser tab.
Captures an area of a specified tab. You must have <all_urls> permission to use this method.
Captures an area of a specified tab. You must have <all_urls> permission to use this method.
The tab to capture. Defaults to the active tab of the current window.
Optionaloptions: ImageDetailsCaptures an area of a specified tab. You must have <all_urls> permission to use this method.
Captures an area of the currently active tab in the specified window. You must have <all_urls> permission to use this method.
Captures an area of the currently active tab in the specified window. You must have <all_urls> permission to use this method.
The target window. Defaults to the current window.
Optionaloptions: ImageDetailsCaptures an area of the currently active tab in the specified window. You must have <all_urls> permission to use this method.
Connects to the content script(s) in the specified tab. The runtime.onConnect event is fired in each content script running in the specified tab for the current extension. For more details, see Content Script Messaging.
OptionalconnectInfo: browser.tabs._ConnectConnectInfoA port that can be used to communicate with the content scripts running in the specified tab. The port's runtime.Port event is fired if the tab closes or does not exist.
Creates a new tab.
Detects the primary language of the content in a tab.
OptionaltabId: number
Defaults to the active tab of the current window.
discards one or more tabs.
The tab or list of tabs to discard.
Duplicates a tab.
The ID of the tab which is to be duplicated.
OptionalduplicateProperties: _DuplicateDuplicatePropertiesInjects JavaScript code into a page. For details, see the programmatic injection section of the content scripts doc.
Details of the script to run. Not supported on manifest versions above 2.
Injects JavaScript code into a page. For details, see the programmatic injection section of the content scripts doc.
The ID of the tab in which to run the script; defaults to the active tab of the current window.
Details of the script to run. Not supported on manifest versions above 2.
Gets the tab that this script call is being made from. May be undefined if called from a non-tab context (for example: a background page or popup view).
Gets the current zoom factor of a specified tab.
OptionaltabId: number
The ID of the tab to get the current zoom factor from; defaults to the active tab of the current window.
Gets the current zoom settings of a specified tab.
OptionaltabId: number
The ID of the tab to get the current zoom settings from; defaults to the active tab of the current window.
Navigate to previous page in tab's history, if available.
OptionaltabId: number
The ID of the tab to navigate backward.
Navigate to next page in tab's history, if available
OptionaltabId: number
The ID of the tab to navigate forward.
Hides one or more tabs. The "tabHide" permission is required to hide tabs. Not all tabs are hidable. Returns an array of hidden tabs.
The TAB ID or list of TAB IDs to hide.
Highlights the given tabs.
Injects CSS into a page. For details, see the programmatic injection section of the content scripts doc.
Details of the CSS text to insert. Not supported on manifest versions above 2.
Injects CSS into a page. For details, see the programmatic injection section of the content scripts doc.
The ID of the tab in which to insert the CSS; defaults to the active tab of the current window.
Details of the CSS text to insert. Not supported on manifest versions above 2.
Moves one or more tabs to a new position within its window, or to a new window. Note that tabs can only be moved to and from normal (window.type === "normal") windows.
The tab or list of tabs to move.
Removes an array of tabs from their lines of succession and prepends or appends them in a chain to another tab.
An array of tab IDs to move in the line of succession. For each tab in the array, the tab's current predecessors will have their successor set to the tab's current successor, and each tab will then be set to be the successor of the previous tab in the array. Any tabs not in the same window as the tab indicated by the second argument (or the first tab in the array, if no second argument) will be skipped.
OptionaltabId: number
The ID of a tab to set as the successor of the last tab in the array, or tabs.TAB_ID_NONE to leave the last tab without a successor. If options.append is true, then this tab is made the predecessor of the first tab in the array instead.
Optionaloptions: _MoveInSuccessionOptionsPrints page in active tab.
Shows print preview for page in active tab.
Gets all tabs that have the specified properties, or all tabs if no properties are specified.
Reload a tab.
Reload a tab.
The ID of the tab to reload; defaults to the selected tab of the current window.
OptionalreloadProperties: _ReloadReloadPropertiesCloses one or more tabs.
The tab or list of tabs to close.
Removes injected CSS from a page. For details, see the programmatic injection section of the content scripts doc.
Details of the CSS text to remove. Not supported on manifest versions above 2.
Removes injected CSS from a page. For details, see the programmatic injection section of the content scripts doc.
The ID of the tab from which to remove the injected CSS; defaults to the active tab of the current window.
Details of the CSS text to remove. Not supported on manifest versions above 2.
Saves page in active tab as a PDF file.
The page settings used to save the PDF file.
Sends a single message to the content script(s) in the specified tab, with an optional callback to run when a response is sent back. The runtime.onMessage event is fired in each content script running in the specified tab for the current extension.
Optionaloptions: browser.tabs._SendMessageOptionsZooms a specified tab.
The new zoom factor. Use a value of 0 here to set the tab to its current default zoom factor. Values greater than zero specify a (possibly non-default) zoom factor for the tab.
Zooms a specified tab.
The ID of the tab to zoom; defaults to the active tab of the current window.
The new zoom factor. Use a value of 0 here to set the tab to its current default zoom factor. Values greater than zero specify a (possibly non-default) zoom factor for the tab.
Sets the zoom settings for a specified tab, which define how zoom changes are handled. These settings are reset to defaults upon navigating the tab.
Defines how zoom changes are handled and at what scope.
Sets the zoom settings for a specified tab, which define how zoom changes are handled. These settings are reset to defaults upon navigating the tab.
The ID of the tab to change the zoom settings for; defaults to the active tab of the current window.
Defines how zoom changes are handled and at what scope.
Shows one or more tabs.
The TAB ID or list of TAB IDs to show.
Toggles reader mode for the document in the tab.
OptionaltabId: number
Defaults to the active tab of the current window.
Modifies the properties of a tab. Properties that are not specified in updateProperties are not modified.
Modifies the properties of a tab. Properties that are not specified in updateProperties are not modified.
Defaults to the selected tab of the current window.
Warm up a tab
The ID of the tab to warm up.
Use the
browser.tabsAPI to interact with the browser's tab system. You can use this API to create, modify, and rearrange tabs in the browser.Not allowed in: Content scripts, Devtools pages