Search completed in 1.41 seconds.
Session store API - Archive of obsolete content
knowing when to restore each time firefox is about to restore a tab, an event of type
sstabrestoring is sent.
... function myextensionhandlerestore(aevent) { var tab = event.originaltarget; /* the tab being restored */ var uri = tab.linkedbrowser.contentdocument.location; /* the tab's uri */ components.classes["@mozilla.org/consoleservice;1"] .getservice(components.interfaces.nsiconsoleservice) .logstringmessage("restoring tab: " + uri); }; document.addeventlistener("
sstabrestoring", myextensionhandlerestore, false); simply replace the contents of the function myextensionhandlerestore() with whatever you need to do when the tab is restored.
... the
sstabrestoring event is sent.
... if you want to set permissions or otherwise manipulate a restored tab before the page is loaded into it, you should watch
sstabrestoring.