<aside> 🔌 The Tabs API allows you to manage tabs within EXT. It enables extensions to create, query, update, remove, and handle various tab-related events, such as clicks, mutes, and closures.
</aside>
Current version: 1.1.0
ext.tabs.get(
tabId: string,
)
Gets the tab with the given ID.
PARAMETERS
tabId: string
The ID of the tab to get.
RETURNS
Promise<Tab>
The promise resolves with the tab object.
ext.tabs.query(
filter?: Partial<Tab>,
)
Queries the tabs based on the provided filter.
PARAMETERS
filter: Partial<Tab>
(optional)
The criteria to filter tabs.
RETURNS
Promise<Tab[]>
The promise resolves with an array of matching tabs.
ext.tabs.create(
properties?: TabProperties,
)
Creates a new tab with the specified properties.
PARAMETERS
properties: TabProperties
(optional)
The properties for the new tab.
RETURNS
Promise<Tab>
The promise resolves with the created tab object.
ext.tabs.remove(
tabIds: string | string[],
)
Removes the specified tabs.
PARAMETERS
tabIds: string | string[]
The ID or IDs of the tabs to remove.
RETURNS
Promise<void>
The promise resolves when the tabs were removed.
ext.tabs.update(
tabIds: string | string[],
properties?: TabProperties,
)
Updates the properties of the specified tabs.
PARAMETERS
tabIds: string | string[]
The ID or IDs of the tabs to update.
properties: TabProperties
(optional)
The properties to update.
RETURNS
Promise<void>
The promise resolves when the tabs were updated.
ext.tabs.click(
tabIds: string | string[],
)
Dispatches a click event on the specified tabs.
PARAMETERS
tabIds: string | string[]
The ID or IDs of the tabs to dispatch the click event on.
RETURNS
Promise<void>
The promise resolves after the click event has been dispatched.
ext.tabs.clickMute(
tabIds: string | string[],
)
Dispatches a mute click event on the specified tabs.
PARAMETERS
tabIds: string | string[]
The ID or IDs of the tabs to dispatch the mute click event on.
RETURNS
Promise<void>
The promise resolves after the click event has been dispatched.
ext.tabs.clickClose(
tabIds: string | string[],
)
Dispatches a close click event on the specified tabs.
PARAMETERS
tabIds: string | string[]
The ID or IDs of the tabs to dispatch the close click event on.
RETURNS
Promise<void>
id: string
extension: string
index: number
icon?: string