onBeforeTabClose

fires before the tab is closed

void onBeforeTabClose(string| number id,event e){ ... };

Parameters

idstring| numbertab ID
eeventevent object

Example

tabbar.attachEvent("onBeforeTabClose", function(id, e){
    //code
});

Related samples

Details

The event fires when user clicks on the "close" button of the tab, but before it is really removed.

The event is cancellable, which means that if an event handler return false, the tab won't be removed.

tabbar.attachEvent("onBeforeTabClose", function(id, e){
    //code
    return false;
});
See also
Back to top