I need to prevent a tab from closing on a condition (not necessarily unsaved data). Is there something I can do with the result object or other API to call to prevent the tab from closing?
sforce.console.getFocusedSubtabId(function (result) {
if (result.id) {
sforce.console.addEventListener(sforce.console.ConsoleEvent.CLOSE_TAB, function (result) { // what to do here }, { tabId : result.id });
}
});