I have a TabClose event.
How to cancel the tab close programmatically?
gBrowser.tabContainer.addEventListener("TabClose", function(){return false;}, false);
cancel the tab close programmatically
-
- Posts: 3664
- Joined: September 15th, 2010, 9:03 am
Re: cancel the tab close programmatically
TabClose isn't cancellable and has no default action. It is simply a notification.
-
- Posts: 3664
- Joined: September 15th, 2010, 9:03 am
Re: cancel the tab close programmatically
Just guessing, but you still want a way to stop tabs closing? You could try overwriting gBrowser.removeTab(). This is certainly a common way to close tabs, but I don't know if it is the only way. You'll have to try it and see. I'm not an expert on tabs, pesky things.
-
- Posts: 779
- Joined: June 12th, 2008, 9:02 am
Re: cancel the tab close programmatically
I did so ty