gBrowser API reference
Generated from the JSDoc in
Tabbrowser.sys.mjs,
so it covers the members that carry a doc comment, leaving out the
pseudo-private _-prefixed ones. Much of the class is documented nowhere but
its source, so read that for anything you don’t find here.
Tabbrowser
- class Tabbrowser()
Displays and manages the contents of a browser window’s tabs. Every window instantiates this class during startup and exposes the instance in its window scope as gBrowser.
- Tabbrowser.browsers
This defines a proxy which allows us to access browsers by index without actually creating a full array of browsers.
- Tabbrowser.nonHiddenTabs
Same as openTabs but excluding hidden tabs.
- Tabbrowser.openTabs
Returns all tabs in the current window, including hidden tabs and tabs in collapsed groups, but excluding closing tabs and the Firefox View tab.
- Tabbrowser.selectedElements
For multiselection, splitsviews can also be selected alongside tabs. The getter for selectedTabs returns an array with the splitview child tabs rather than the splitview itself. Hence the need for selectedElements. We need to know the indices of the draggable elements, such as the splitview parent element. This getter returns an array of multiselected tabs and splitview parent elements (as opposed to splitview child tabs).
- Tabbrowser.splitViewBrowsers
type: Array.<MozBrowser>
List of browsers which are currently in an active Split View.
- Tabbrowser.visibleTabs
Same as openTabs but excluding hidden tabs and tabs in collapsed groups.
- Tabbrowser.addAdjacentNewTab(tab)
- Arguments:
tab (MozTabbrowserTab)
- Returns:
void – New tab will be the Tabbrowser.selectedTab or the subject of a notification on the browser-open-newtab-start topic.
- Tabbrowser.addAdjacentTab(adjacentTab, uriString, options)
Creates a tab directly after tab.
- Arguments:
adjacentTab (MozTabbrowserTab)
uriString (string)
options (object) – Options from Tabbrowser.addTab.
- Tabbrowser.addProgressListener(aListener)
Adds a listener for web progress notifications about the selected browser.
The listener is a plain object whose methods mirror nsIWebProgressListener; implementing only the ones you need is normal. docs/progress-listeners.md covers what is delivered when, and what a tab switch replays.
- Arguments:
aListener (object) – The listener to add.
- Tabbrowser.addRangeToMultiSelectedTabs(aTab1, aTab2)
Adds two given tabs and all tabs between them into the (multi) selected tabs collection
- Arguments:
aTab1 (MozTabbrowserTab)
aTab2 (MozTabbrowserTab)
- Tabbrowser.addTab(uriString, options)
- Arguments:
uriString (string)
options (object)
options.allowInheritPrincipal (boolean) – Allow the load to inherit the triggering principal.
options.allowThirdPartyFixup (boolean) – Allow transforming the URI into a search query.
options.bulkOrderedOpen (boolean) – Keep the tab in the order it was opened in rather than inserting it next to the current tab, as wanted when opening a set of tabs at once.
options.charset (string) – Character set to use for the load. Legacy argument - do not use.
options.createLazyBrowser (boolean) – Create the tab with a lazy browser, which only loads its URI once the tab is first selected.
options.eventDetail (object) – Additional information to include in the CustomEvent.detail of the resulting TabOpen event.
options.focusUrlBar (boolean) – Focus the address bar when the tab is selected.
options.forceNotRemote (boolean) – Create the tab’s browser in the parent process.
options.forceAllowDataURI (boolean) – Force allow a data URI to load as a toplevel load.
options.fromExternal (boolean) – Whether this tab was opened from a URL supplied to Firefox from an external application.
options.inBackground (boolean) – Whether the tab is being opened in the background. This does not select the tab - it only decides whether the selected tab becomes the new tab’s owner, i.e. the tab to select when the new tab is closed.
options.isCaptivePortalTab (boolean) – Whether the tab loads a captive portal login page, whose load must not use DNS over HTTPS.
options.elementIndex (number) – The position to open the tab at, expressed as an index within the MozTabbrowserTabs::dragAndDropElements array.
options.tabIndex (number) – The same position, expressed as an index within the tabs array.
options.lazyTabTitle (string) – Title to give a lazy browser’s tab until its URI loads.
options.name (string) – Name of the window the tab’s browser represents, as passed to window.open().
options.noInitialLabel (boolean) – Leave the tab’s label empty until the load provides a title, rather than labelling it with its URI.
options.openWindowInfo (nsIOpenWindowInfo) – Information about the content window that asked for this tab, when it comes from a window.open() call.
options.openerBrowser (MozBrowser) – The browser that started the load, used to position the tab and to inherit attributes such as the user context ID from.
options.originPrincipal (nsIPrincipal) – Origin principal to inherit when uriString is given and no preloaded browser is used.
options.originStoragePrincipal (nsIPrincipal) – Origin storage principal to inherit when uriString is given and no preloaded browser is used.
options.ownerTab (MozTabbrowserTab) – The tab to select when this tab is closed. Defaults to the selected tab for a foreground tab, and to none for a background tab.
options.pinned (boolean) – Open the tab pinned.
options.postData (nsIInputStream) – Data to post as part of the request.
options.preferredRemoteType (string) – Remote type to prefer for the tab’s browser, when the URI can load in more than one.
options.referrerInfo (nsIReferrerInfo) – Referrer info for the request.
options.relatedToCurrent (boolean) – Whether the tab is related to the current tab, e.g. because a link in it was clicked, which lets it open next to it. Defaults to whether referrerInfo carries a referrer.
options.initialBrowsingContextGroupId (number) – Browsing context group to create the tab’s browser in, which can place it in the same process as another window.
options.skipAnimation (boolean) – Skip the tab opening animation.
options.skipBackgroundNotify (boolean) – Don’t draw attention to the tab when it wants to be selected while loading in the background.
options.tabGroup (MozTabbrowserTabGroup) – A related tab group where this tab should be added, when applicable. When present, the tab is expected to reside in this tab group. When absent, the tab is expected to be a standalone tab.
options.triggeringPrincipal (nsIPrincipal) – Triggering principal to pass to docshell for the load.
options.userContextId (number) – The userContextId (container identifier) to open the tab in. Inherited from the opener tab when absent.
options.policyContainer (nsIPolicyContainer) – The policy container that should apply to the load.
options.skipLoad (boolean) – Create the tab’s browser without starting a load in it. Defaults to createLazyBrowser.
options.insertTab (boolean) – Insert the tab into the tab strip.
options.globalHistoryOptions (object) – Used by Places to keep track of search related metadata for the load.
options.triggeringRemoteType (string) – The remoteType triggering this load.
options.schemelessInput (nsILoadInfo_SchemelessInputType) – Whether the search/URL term was without an explicit scheme.
options.hasValidUserGestureActivation (boolean) – Indicates if a valid user gesture caused this load. This informs e.g. popup blocker decisions.
options.textDirectiveUserActivation (boolean) – Whether a user gesture allows the load to scroll to a text fragment.
- Returns:
MozTabbrowserTab|null – The new tab. The return value will be null if the tab couldn’t be created; this shouldn’t normally happen, and an error will be logged to the console if it does.
- Tabbrowser.addTabGroup(tabsAndSplitViews, options)
Adds a new tab group.
- Arguments:
tabsAndSplitViews (Array.<object>) – The set of tabs or split view to include in the group.
options (object)
options.id (string) – Optionally assign an ID to the tab group. Useful when rebuilding an existing group e.g. when restoring. A pseudorandom string will be generated if not set.
options.color (string) – Color for the group label. See tabgroup-menu.js for possible values. If no color specified, will attempt to assign an unused group color.
options.label (string) – Label for the group.
options.insertBefore (MozTabbrowserTab) – An optional argument that accepts a single tab, which, if passed, will cause the group to be inserted just before this tab in the tab strip. By default, the group will be created at the end of the tab strip.
options.isAdoptingGroup (boolean) – Whether the tab group was created because a tab group with the same properties is being adopted from a different window.
options.metricsContext (TabMetricsContext) – The context for the operation for telemetry purposes. Defaults to an unknown context.
- Tabbrowser.addTabSplitView(tabs, options)
Adds a new tab split view.
- Arguments:
tabs (Array.<object>) – The set of tabs to include in the split view.
options (object)
options.id (number) – Optionally assign an ID to the split view. Useful when rebuilding an existing splitview e.g. when restoring. An integer id from a incrementing counter will be generated if not set.
options.insertBefore (MozTabbrowserTab) – An optional argument that accepts a single tab, which, if passed, will cause the split view to be inserted just before this tab in the tab strip. By default, the split view will be created at the end of the tab strip.
options.trigger (string) – The trigger method for creating the split view. Used for telemetry. Valid values: “menu_add”, “menu_open”.
- Tabbrowser.addTabsProgressListener(aListener)
Adds a listener for web progress notifications about every tab.
As addProgressListener, except that each method takes the browser the notification belongs to as an extra leading argument.
- Arguments:
aListener (object) – The listener to add.
- Tabbrowser.addToMultiSelectedTabs(aTab)
Adds a tab into the (multi) selected tabs collection.
Warning: this function can be called from a loop, when selecting several tabs. Instead of adding expensive logic here, do it in _endMultiSelectChange().
- Arguments:
aTab (MozTabbrowserTab)
- Tabbrowser.addTrustedTab(aURI, options)
Must only be used sparingly for content that came from Chrome context If in doubt use addWebTab
- Arguments:
aURI (string)
options (object)
- Returns:
MozTabbrowserTab|null –
See also
- Tabbrowser.addWebTab(aURI, params)
Loads a tab with a default null principal unless specified
- Arguments:
aURI (string)
params (object) – Options from Tabbrowser.addTab.
- Tabbrowser.adoptSplitView(container, options)
- Arguments:
container (MozSplitViewWrapper)
options (object)
options.elementIndex (number)
options.tabIndex (number)
options.selectTab (boolean)
- Returns:
MozSplitViewWrapper –
- Tabbrowser.adoptTab(aTab, options)
Adopts a tab from another browser window, and inserts it at the given index.
- Arguments:
aTab (MozTabbrowserTab) – The tab to adopt, which belongs to another window.
options (object)
options.elementIndex (number) – The desired position, expressed as the index within the MozTabbrowserTabs::dragAndDropElements array.
options.tabIndex (number) – The desired position, expressed as the index within the tabs array.
options.selectTab (boolean) – Whether to make the adopted tab the new active tab.
- Returns:
object – The new tab in the current window, null if the tab couldn’t be adopted.
- Tabbrowser.adoptTabGroup(group, options)
- Arguments:
group (MozTabbrowserTabGroup)
options (object)
options.elementIndex (number)
options.tabIndex (number)
options.selectTab (boolean)
- Returns:
MozTabbrowserTabGroup –
- Tabbrowser.closeTabsByURI(urisToClose)
Closes all tabs matching the list of nsURIs. This does not close any tabs that have a beforeUnload prompt.
- Arguments:
urisToClose (Array.<nsURI>) – The set of uris to remove.
- Returns:
number – The count of successfully closed tabs.
- Tabbrowser.createTabsForSessionRestore(restoreTabsLazily, selectTab, tabDataList, tabGroupDataList, splitViewDataList)
- Arguments:
restoreTabsLazily (boolean)
selectTab (number) – see SessionStore.restoreTabs { aSelectTab }
tabDataList (Array.<TabStateData>)
tabGroupDataList (Array.<TabGroupStateData>)
splitViewDataList (Array.<TabSplitViewStateData>)
- Returns:
Array.<MozTabbrowserTab> –
- Tabbrowser.duplicateTab(aTab, aRestoreTabImmediately, aOptions)
- Arguments:
aTab (MozTabbrowserTab) – Can be from a different window as well
aRestoreTabImmediately (boolean) – Can defer loading of the tab contents
aOptions (object) – Takes inBackground and tabIndex, as SessionStore.duplicateTab does
- Returns:
MozTabbrowserTab –
- Tabbrowser.fixupAndLoadURIString(uriString, params)
throws exception for unknown schemes
- Arguments:
uriString (string)
params (LoadURIOptions)
- Tabbrowser.getAllTabGroups(options)
Get all open tab groups from all windows. Does not include saved groups.
- Arguments:
options (object)
options.sortByLastSeenActive (boolean) – Sort groups so that groups that have more recently seen and active tabs appear first. Defaults to false.
- Tabbrowser.getCachedFindBar(aTab)
Get the already constructed findbar
- Arguments:
aTab (MozTabbrowserTab) – Defaults to the selected tab.
- Tabbrowser.getFindBar(aTab)
Get the findbar, and create it if it doesn’t exist.
- Arguments:
aTab (MozTabbrowserTab) – Defaults to the selected tab.
- Returns:
the find bar (or null if the window or tab is closed/closing in the interim).
- Tabbrowser.getTabTooltip(tab, includeLabel=true)
- Arguments:
tab (MozTabbrowserTab)
includeLabel (boolean) – Include the tab’s title/full label in the tooltip. Defaults to true, Can be disabled for contexts where including the title in the tooltip string would be duplicative would already available information, e.g. accessibility descriptions.
- Returns:
string –
- Tabbrowser.handleNewTabMiddleClick(node, event)
Handles opening a new tab with mouse middleclick.
- Arguments:
node (Element) – The element that was clicked
event (MouseEvent) – The click event
- Tabbrowser.handleTabMove(element, moveActionCallback, options)
- Arguments:
element (MozTabbrowserTab|MozTabbrowserTabGroup|MozTabSplitViewWrapper)
moveActionCallback (function)
options (object)
options.metricsContext (TabMetricsContext) – The context for the operation for telemetry purposes.
- Tabbrowser.isSplitViewWrapper(element)
- Arguments:
element (Element)
- Returns:
boolean – true if element is a <tab-split-view-wrapper>
- Tabbrowser.isTab(element)
- Arguments:
element (Element)
- Returns:
boolean – true if element is a <tab>
- Tabbrowser.isTabGroup(element)
- Arguments:
element (Element)
- Returns:
boolean – true if element is a <tab-group>
- Tabbrowser.isTabGroupLabel(element)
- Arguments:
element (Element)
- Returns:
boolean – true if element is the <label> in a <tab-group>
- Tabbrowser.loadTabs(aURIs, options)
Load multiple URIs in tabs.
- Arguments:
aURIs (Array.<string>) – Array of URIs to load.
options (object)
options.allowInheritPrincipal (boolean) – Allow the loads to inherit the triggering principal.
options.allowThirdPartyFixup (boolean) – Allow transforming a URI into a search query.
options.inBackground (boolean) – Leave the current tab selected instead of switching to the first tab that was opened.
options.newIndex (number) – The position to open the first tab at, expressed as an index within the tabs array. The remaining tabs follow it.
options.elementIndex (number) – The same position, expressed as an index within the MozTabbrowserTabs::dragAndDropElements array.
options.postDatas (Array.<nsIInputStream>) – Data to post as part of each request, in the same order as aURIs.
options.replace (boolean) – Load the first URI in an existing tab rather than opening a tab for it.
options.tabGroup (MozTabbrowserTabGroup) – A tab group to open the tabs in.
options.targetTab (MozTabbrowserTab) – The tab to load the first URI in when replace is set. Defaults to the selected tab.
options.triggeringPrincipal (nsIPrincipal) – Triggering principal to pass to docshell for the loads.
options.policyContainer (nsIPolicyContainer) – The policy container that should apply to the loads.
options.userContextId (number) – The userContextId (container identifier) to open the tabs in.
options.fromExternal (boolean) – Whether the URIs were supplied to Firefox from an external application.
options.newWindowLoad (boolean) – Whether the load initiates a new window, which is not web-controlled. Only honoured together with replace.
- Returns:
Array.<MozTabbrowserTab> – Array of tabs that were opened or reused, in the same order as aURIs.
- Tabbrowser.loadURI(uri, params)
throws exception for unknown schemes
- Arguments:
uri (nsIURI)
params (LoadURIOptions)
- Tabbrowser.maybeCloseTabForRetargetedLoad(aBrowser)
A tab which never showed anything but a blank page and has no history only existed for the load which has been moved away, so close it rather than leave it behind empty. Closing the last tab of a window is left out: that would close the window.
- Arguments:
aBrowser (MozBrowser) – The browser the load started in.
- Tabbrowser.moveSplitViewToExistingGroup(aSplitView, aGroup, options)
- Arguments:
aSplitView (MozSplitViewWrapper)
aGroup (MozTabbrowserTabGroup)
options (object)
options.metricsContext (TabMetricsContext) – The context for the operation for telemetry purposes.
- Tabbrowser.moveTabAfter(element, targetElement, options)
- Arguments:
element (MozTabbrowserTab|MozTabbrowserTabGroup)
targetElement (MozTabbrowserTab|MozTabbrowserTabGroup)
options (object)
options.metricsContext (TabMetricsContext) – The context for the operation for telemetry purposes.
- Tabbrowser.moveTabBefore(element, targetElement, options)
- Arguments:
element (MozTabbrowserTab|MozTabbrowserTabGroup)
targetElement (MozTabbrowserTab|MozTabbrowserTabGroup)
options (object)
options.metricsContext (TabMetricsContext) – The context for the operation for telemetry purposes.
- Tabbrowser.moveTabTo(element, options)
- Arguments:
element (MozTabbrowserTab|MozTabbrowserTabGroup) – The tab or tab group to move. Also accepts a tab group label as a stand-in for its group.
options (object)
options.tabIndex (number) – The desired position, expressed as the index within the tabs array.
options.elementIndex (number) – The desired position, expressed as the index within the MozTabbrowserTabs::dragAndDropElements array.
options.forceUngrouped (boolean) – Force element to move into position as a standalone tab, overriding any possibility of entering a tab group. For example, setting true ensures that a pinned tab will not accidentally be placed inside of a tab group, since pinned tabs are presently not allowed in tab groups.
options.metricsContext (TabMetricsContext) – The context for the operation for telemetry purposes.
- Tabbrowser.moveTabToExistingGroup(aTab, aGroup, options)
- Arguments:
aTab (MozTabbrowserTab)
aGroup (MozTabbrowserTabGroup)
options (object)
options.metricsContext (TabMetricsContext) – The context for the operation for telemetry purposes.
- Tabbrowser.moveTabToSplitView(aTab, aSplitViewWrapper, insertAtIndex=-1)
- Arguments:
aTab (MozTabbrowserTab)
aSplitViewWrapper (MozTabSplitViewWrapper)
insertAtIndex (int) – An optional index for a tab to insert into the split view
- Tabbrowser.moveTabsAfter(elements, targetElement, options)
- Arguments:
elements (MozTabbrowserTab|Array.<MozTabbrowserTabGroup>)
targetElement (MozTabbrowserTab|MozTabbrowserTabGroup)
options (object)
options.metricsContext (TabMetricsContext) – The context for the operation for telemetry purposes.
- Tabbrowser.moveTabsBefore(elements, targetElement, options)
- Arguments:
elements (MozTabbrowserTab|Array.<MozTabbrowserTabGroup>)
targetElement (MozTabbrowserTab|MozTabbrowserTabGroup)
options (object)
options.metricsContext (TabMetricsContext) – The context for the operation for telemetry purposes.
- Tabbrowser.pinTab(aTab, options)
Pin a tab.
- Arguments:
aTab (MozTabbrowserTab) – The tab to pin.
options (object)
options.metricsContext (TabMetricsContext) – The context for the operation for telemetry purposes, defaults to an unknown context.
- Tabbrowser.recordTabMetrics(action, metricsContext, options)
Records a tab interaction metric.
- Arguments:
action (string) – The action from TabMetrics.METRIC_ACTION.
metricsContext (TabMetricsContext) – Context for the metric.
options (object)
options.tabCount (number) – Number of tabs involved. Defaults to the number of selected tabs.
- Tabbrowser.removeAllDuplicateTabs(options)
- Arguments:
options (object)
options.confirmationAnchor (Element) – What the “closed N tabs” hint should point at. Callers outside the All Tabs menu need to pass their own button, since the All Tabs button is not necessarily on the toolbar and the hint lands in the window’s corner without an anchor.
- Tabbrowser.removeAllTabsBut(aTab, aParams)
Remove all tabs but aTab. By default, in a multi-select context, all unpinned and unselected tabs are removed. Otherwise all unpinned tabs except aTab are removed. This behavior can be changed using the the bool flags below.
- Arguments:
aTab (MozTabbrowserTab) – The tab we will skip removing
aParams (object) – An optional set of parameters that will be passed to the removeTabs function.
aParams.skipWarnAboutClosingTabs (boolean) – Skip showing the tab close warning prompt.
aParams.skipPinnedOrSelectedTabs (boolean) – Skip closing tabs that are selected or pinned.
- Tabbrowser.removeFromMultiSelectedTabs(aTab)
Removes a tab from the (multi) selected tabs collection.
Warning: this function can be called from a loop, when unselecting several tabs. Instead of adding expensive logic here, do it in _endMultiSelectChange().
- Arguments:
aTab (MozTabbrowserTab)
- Tabbrowser.removeProgressListener(aListener)
Removes a listener added with addProgressListener.
- Arguments:
aListener (object) – The listener to remove.
- Tabbrowser.removeTabGroup(group, options)
Removes the tab group. This has the effect of closing all the tabs in the group.
- Arguments:
group (MozTabbrowserTabGroup) – The tab group to remove.
options (object) – Options to use when removing tabs. @see removeTabs for more info.
- Tabbrowser.removeTabs(tabs, options)
Removes multiple tabs from the tab browser.
- Arguments:
tabs (Array.<MozTabbrowserTab>) – The set of tabs to remove.
options (object)
options.animate (boolean) – Whether or not to animate closing, defaults to true.
options.suppressWarnAboutClosingWindow (boolean) – This will suppress the warning about closing a window with the last tab.
options.skipPermitUnload (boolean) – Skips the before unload checks for the tabs. Only set this to true when using it in tandem with runBeforeUnloadForTabs.
options.skipSessionStore (boolean) – If true, don’t record the closed tabs in SessionStore.
options.skipGroupCheck (boolean) – Skip separate processing of whole tab groups from the set of tabs. Used by removeTabGroup.
options.metricsContext (TabMetricsContext) – The context for the operation for telemetry purposes
- Tabbrowser.removeTabsProgressListener(aListener)
Removes a listener added with addTabsProgressListener.
- Arguments:
aListener (object) – The listener to remove.
- Tabbrowser.removeTabsToTheEndFrom(aTab, options)
In a multi-select context, the tabs (except pinned tabs) that are located to the right of the rightmost selected tab will be removed.
- Arguments:
aTab (MozTabbrowserTab)
options (object) – Options to use when removing tabs. @see removeTabs for more info.
- Tabbrowser.removeTabsToTheStartFrom(aTab, options)
In a multi-select context, the tabs (except pinned tabs) that are located to the left of the leftmost selected tab will be removed.
- Arguments:
aTab (MozTabbrowserTab)
options (object) – Options to use when removing tabs. @see removeTabs for more info.
- Tabbrowser.replaceGroupWithWindow(group, options)
Moves group to a new window.
- Arguments:
group (MozTabbrowserTabGroup) – The tab group to move.
options (object)
options.metricsContext (TabMetricsContext) – The context for the operation for telemetry purposes.
- Tabbrowser.replaceInSuccession(aTab, aOtherTab)
For all tabs with aTab as a successor, set the successor to aOtherTab instead.
- Arguments:
aTab (MozTabbrowserTab)
aOtherTab (MozTabbrowserTab)
- Tabbrowser.replaceTabWithWindow(aTab, aOptions={})
Moves a tab to a new browser window, unless it’s already the only tab in the current window, in which case this will do nothing.
- Arguments:
aTab (MozTabbrowserTab|MozTabbrowserTabGroup|MozTabbrowserTabGroup.labelElement)
aOptions (object) – Key-value pairs that will be serialized into the features string.
- Tabbrowser.replaceTabsWithWindow(contextTab, aOptions)
Move contextTab (or selected tabs in a mutli-select context) to a new browser window, unless it is (they are) already the only tab(s) in the current window, in which case this will do nothing.
- Arguments:
contextTab (MozTabbrowserTab) – The tab the command applies to, which need not be selected.
aOptions (object) – Key-value pairs that will be serialized into the features string.
- Tabbrowser.runBeforeUnloadForTabs(tabs)
Runs the before unload handler for the provided tabs, waiting for them to complete.
This can be used in tandem with removeTabs to allow any before unload prompts to happen before any tab closures. This should only be used in the case where any prompts need to happen before other items before the actual tabs are closed.
When using this function alongside removeTabs, specify the skipUnload option to removeTabs.
- Arguments:
tabs (Array.<object>) – An array of tabs to remove.
- Returns:
Promise.<boolean> – Returns true if the unload has been blocked by the user. False if tabs may be subsequently closed.
- Tabbrowser.setDefaultIcon(aTab, aURI)
Sets an icon for the tab if the URI is defined in FAVICON_DEFAULTS.
- Arguments:
aTab (MozTabbrowserTab)
aURI (nsIURI)
- Tabbrowser.shouldActivateDocShell(aBrowser)
Returns true if a given browser’s docshell should be active.
- Arguments:
aBrowser (MozBrowser)
- Tabbrowser.showSplitViewPanels(tabs)
Show the list of tabs <browsers> that are part of a split view.
- Arguments:
tabs (Array.<MozTabbrowserTab>)
- Tabbrowser.swapBrowsersAndCloseOther(aOurTab, aOtherTab)
Swaps the browsers of two tabs, then closes the other tab.
- Arguments:
aOurTab (MozTabbrowserTab) – The tab in this window, which takes over the other tab’s browser.
aOtherTab (MozTabbrowserTab) – The tab to take the browser from, which may be in another window.
- Returns:
boolean – False if swapping isn’t permitted, true otherwise.
- Tabbrowser.ungroupTab(tab)
Removes a tab from a group. This has no effect on tabs that are not already in a group.
- Arguments:
tab (MozTabbrowserTab) – The tab to ungroup
- Tabbrowser.unpinTab(aTab, options)
Unpin a tab.
- Arguments:
aTab (MozTabbrowserTab) – The tab to pin.
options (object)
options.metricsContext (TabMetricsContext) – The context for the operation for telemetry purposes, defaults to an unknown context.