Newer Version Available

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

force:tabClosed

Indicates that a tab has been closed successfully.

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    <force:workspaceAPIAccess aura:id="workspace" />	
3    <aura:handler event="force:tabClosed" action="{! c.onTabClosed }"/> 
4</aura:component>

Controller code:

1({
2    onTabclosed : function(component, event, helper) {
3        console.log("Tab closed.");
4    }, 
5})