Newer Version Available

This content describes an older version of this product. View Latest

getFocusedTabInfo() for Lightning Experience

Returns information about the focused workspace tab or subtab. This method works only in Lightning console apps.

Arguments

None.

Sample Code

This component has a button that, when pressed, closes the currently focused tab.

Component code:

Controller code:

Response

This method returns a promise that, upon success, resolves to a tabInfo object representing the focused tab. A tabInfo object is a JSON array of information about a workspace tab, with nested arrays of information on each subtab. This is the structure of a tabInfo object.