TabClose Event

The TabClose event subscription gives a notification about a browser tab, a new window tab close event, or a new MSI tab close event happening in any already opened browser tabs with the Fusion application loaded.

The event response will give the ITabInfo object of the closed tab, on top of which you can call gettabId(), getMSITabId(), and getMSISubTabId() to get the browser tabId, MSI tabid, and MSI sub tab id of the closed tab respectively.

Note: TabClose is an event listenable from GlobalContext.
Here's a TypeScript example:
const subscribeTabClose = async () => {

        const frameworkProvider: IUiEventsFrameworkProvider = await 
CX_SVC_UI_EVENTS_FRAMEWORK.uiEventsFramework.initialize('appname', 'v1');
        const globalContext: IGlobalContext = await frameworkProvider.getGlobalContext();

        const payload: IEventRequest = 
frameworkProvider.requestHelper.createSubscriptionRequest('cxEventBusTabCloseEvent');
        globalContext.subscribe(payload, (response: IEventResponse) => {
            let responseData = response as ITabCloseEventResponse;
            console.log(responseData.getResponseData().getTabId()); // Opened Tab's identifier
            console.log(responseData.getEventName()); // 'cxEventBusTabCloseEvent'
            console.log(responseData.getContext()); // contextObject info
        });
    }
Here's a JavaScript example:
const subscribeTabClose = async () => {

        const frameworkProvider = await 
CX_SVC_UI_EVENTS_FRAMEWORK.uiEventsFramework.initialize('appname', 'v1');
        const globalContext = await frameworkProvider.getGlobalContext();
        const payload = frameworkProvider.requestHelper.createSubscriptionRequest('cxEventBusTabCloseEvent');
        globalContext.subscribe(payload, (responseData) => {
            console.log(responseData.getResponseData().getTabId()); // Opened Tab's identifier
            console.log(responseData.getEventName()); // 'cxEventBusTabCloseEvent'
            console.log(responseData.getContext()); // contextObject info
        });
    }