B2G/gecko/testing/marionette/marionette-server.js
/**
   * Get the server-assigned IDs of all available windows
   */
Get the server-assigned IDs of all available windows
Get the server - assigned IDs of all available windows
function MDA_getWindows() {
    this.command_id = this.getCommandId();
    let res = [];
    let winEn = this.getWinEnumerator(); 
    while(winEn.hasMoreElements()) {
      let foundWin = winEn.getNext();
      let winId = foundWin.QueryInterface(Ci.nsIInterfaceRequestor).getInterface(Ci.nsIDOMWindowUtils).outerWindowID;
      winId = winId + ((appName == "B2G") ? '-b2g' : '');
      res.push(winId)
    }
    this.sendResponse(res, this.command_id);
  }
function MDA_getWindows ( ) { this . command_id = this . getCommandId ( ) ; let res = [ ] ; let winEn = this . getWinEnumerator ( ) ; while ( winEn . hasMoreElements ( ) ) { let foundWin = winEn . getNext ( ) ; let winId = foundWin . QueryInterface ( Ci . nsIInterfaceRequestor ) . getInterface ( Ci . nsIDOMWindowUtils ) . outerWindowID ; winId = winId + ( ( appName == "B2G" ) ? '-b2g' : '' ) ; res . push ( winId ) } this . sendResponse ( res , this . command_id ) ; }
Get the server-assigned IDs of all available windows
Get the server - assigned IDs of all available windows