B2G/gecko/services/aitc/modules/main.js
// Add listeners for all windows opened in the future.
Add listeners for all windows opened in the future.
Add listeners for all windows opened in the future .
function winWatcher(subject, topic) {
      if (topic != "domwindowopened") {
        return;
      }
      subject.addEventListener("load", function winWatcherLoad() {
        subject.removeEventListener("load", winWatcherLoad, false);
        let doc = subject.document.documentElement;
        if (doc.getAttribute("windowtype") == "navigator:browser") {
          let browser = subject.gBrowser;
          browser.addTabsProgressListener(listener);
          browser.tabContainer.addEventListener("TabSelect", tabSelected);
        }
      }, false);
    }
function winWatcher ( subject , topic ) { if ( topic != "domwindowopened" ) { return ; } subject . addEventListener ( "load" , function winWatcherLoad ( ) { subject . removeEventListener ( "load" , winWatcherLoad , false ) ; let doc = subject . document . documentElement ; if ( doc . getAttribute ( "windowtype" ) == "navigator:browser" ) { let browser = subject . gBrowser ; browser . addTabsProgressListener ( listener ) ; browser . tabContainer . addEventListener ( "TabSelect" , tabSelected ) ; } } , false ) ; }
Add listeners for all windows opened in the future.
Add listeners for all windows opened in the future .