B2G/gecko/browser/components/sessionstore/test/head.js
// coming from them when creating a multi-window state.
coming from them when creating a multi-window state.
coming from them when creating a multi - window state .
function windowObserver(aSubject, aTopic, aData) {
    if (aTopic == "domwindowopened") {
      let newWindow = aSubject.QueryInterface(Ci.nsIDOMWindow);
      newWindow.addEventListener("load", function() {
        newWindow.removeEventListener("load", arguments.callee, false);
        if (++windowsOpen == expectedWindows) {
          Services.ww.unregisterNotification(windowObserver);
          windowObserving = false;
        }
        windows.push(newWindow);
        newWindow.gBrowser.tabContainer.addEventListener("SSTabRestored", onSSTabRestored, true);
      }, false);
    }
  }
function windowObserver ( aSubject , aTopic , aData ) { if ( aTopic == "domwindowopened" ) { let newWindow = aSubject . QueryInterface ( Ci . nsIDOMWindow ) ; newWindow . addEventListener ( "load" , function ( ) { newWindow . removeEventListener ( "load" , arguments . callee , false ) ; if ( ++ windowsOpen == expectedWindows ) { Services . ww . unregisterNotification ( windowObserver ) ; windowObserving = false ; } windows . push ( newWindow ) ; newWindow . gBrowser . tabContainer . addEventListener ( "SSTabRestored" , onSSTabRestored , true ) ; } , false ) ; } }
coming from them when creating a multi-window state.
coming from them when creating a multi - window state .
// Track this window so we can remove the progress listener later // Add the progress listener