B2G/gecko/services/sync/tps/extensions/mozmill/resource/modules/init.js
// still use pagehide for cases when beforeunload doesn't get fired
still use pagehide for cases when beforeunload doesn't get fired
still use pagehide for cases when beforeunload doesn ' t get fired
function beforeUnloadHandler(event) {
    var doc = event.originalTarget;
    var tab = window.gBrowser.getBrowserForDocument(event.target);
    if (tab) {
      tab.mozmillDocumentLoaded = false;
    } else {
      doc.defaultView.mozmillDocumentLoaded = false;
    }
    window.gBrowser.removeEventListener("beforeunload", beforeUnloadHandler, true);
  }
function beforeUnloadHandler ( event ) { var doc = event . originalTarget ; var tab = window . gBrowser . getBrowserForDocument ( event . target ) ; if ( tab ) { tab . mozmillDocumentLoaded = false ; } else { doc . defaultView . mozmillDocumentLoaded = false ; } window . gBrowser . removeEventListener ( "beforeunload" , beforeUnloadHandler , true ) ; }
still use pagehide for cases when beforeunload doesn't get fired
still use pagehide for cases when beforeunload doesn ' t get fired
//log("*** Unload tab: location=" + doc.location + ", baseURI=" + doc.baseURI + "\n"); //log("*** Unload HTML location=" + doc.location + ", baseURI=" + doc.baseURI + "\n");