Newer Version Available
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: