tabs module

Provides APIs for querying and navigating between contextual tabs of an application. Unlike personal tabs, contextual tabs are pages associated with a specific context, such as channel or chat.

Functions

getMruTabInstances(TabInstanceParameters)

Retrieves the most recently used application tabs for the current user.

getTabInstances(TabInstanceParameters)

Retrieves application tabs for the current user. If no TabInstanceParameters are passed, the application defaults to favorite teams and favorite channels.

isSupported()

Checks if the pages.tab capability is supported by the host

navigateToTab(TabInstance)

Navigates the hosted application to the specified tab instance.

Function Details

getMruTabInstances(TabInstanceParameters)

Retrieves the most recently used application tabs for the current user.

function getMruTabInstances(tabInstanceParameters?: TabInstanceParameters): Promise<TabInformation>

Parameters

tabInstanceParameters
TabInstanceParameters

An optional set of flags. Note this is currently ignored and kept for future use.

Returns

Promise<TabInformation>

Promise that resolves with the TabInformation. Contains information for the users' most recently used tabs TabInstance.

getTabInstances(TabInstanceParameters)

Retrieves application tabs for the current user. If no TabInstanceParameters are passed, the application defaults to favorite teams and favorite channels.

function getTabInstances(tabInstanceParameters?: TabInstanceParameters): Promise<TabInformation>

Parameters

tabInstanceParameters
TabInstanceParameters

An optional set of flags that specify whether to scope call to favorite teams or channels.

Returns

Promise<TabInformation>

Promise that resolves with the TabInformation. Contains information for the user's tabs that are owned by this application TabInstance.

isSupported()

Checks if the pages.tab capability is supported by the host

function isSupported(): boolean

Returns

boolean

boolean to represent whether the pages.tab capability is supported

navigateToTab(TabInstance)

Navigates the hosted application to the specified tab instance.

function navigateToTab(tabInstance: TabInstance): Promise<void>

Parameters

tabInstance
TabInstance

The destination tab instance.

Returns

Promise<void>

Promise that resolves when the navigation has completed.