On palemoon, you get an SSWindowStateBusy event when starting the restore, followed by an SSTabRestoring event for each tab, followed by an SSWindowStateReady event. In basilisk, you get the WindowStateReady event before any of the SSTabRestoring events.
I'm not sure why that difference, and while it's possible to code round it, the order of events in palemoon seems a little easier to deal with (and obviously I'd like not to have to code round it in the first place!)
The code to register for the events is:
Code: Select all
gBrowser.tabContainer.addEventListener("SSTabRestoring", this, false);
window.addEventListener("SSWindowStateBusy", this, false);
window.addEventListener("SSWindowStateReady", this, false);