Newer Version Available

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

lightning:tabFocused

Indicates that a tab has been focused.

Response

Name Type Description
previousTabId string The ID of the previously focused tab.
currentTabId string The ID of the currently focused tab.

Example

This example prints a line to the browser’s developer console when a tab is focused, and then returns that tab’s tabInfo object using the getTabInfo() method.

Component code:

Controller code: