<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

Functions


get

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.


query

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.


create

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.


remove

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.


update

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.


click

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.


clickMute

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.


clickClose

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>


Types


Tab

id: string

extension: string

index: number

icon?: string