Note: This release is in preview. Features described here don’t become generally available until the latest general availability date that Salesforce announces for this release. Before then, and where features are noted as beta, pilot, or developer preview, we can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features.
lightning:tabClosed
Response
| Name | Type | Description |
|---|---|---|
| tabId | string | The ID of the closed tab. |
Example
This example prints a line to the browser’s developer console when a tab is closed.
Component code:
1<aura:component implements="flexipage:availableForAllPageTypes" access="global" >
2 <aura:handler event="lightning:tabClosed" action="{! c.onTabClosed }"/>
3</aura:component>Controller code:
1({
2 onTabClosed : function(component, event, helper) {
3 var tabId = event.getParam('tabId');
4 console.log("Tab closed: " + tabId);
5 }
6})