B2G/gecko/browser/devtools/scratchpad/scratchpad.js
/**
   * Set the current execution context to be the most recent chrome window.
   */
Set the current execution context to be the most recent chrome window.
Set the current execution context to be the most recent chrome window .
function SP_setBrowserContext()
  {
    if (this.executionContext == SCRATCHPAD_CONTEXT_BROWSER) {
      return;
    }
    let browser = document.getElementById("sp-menu-browser");
    let reloadAndRun = document.getElementById("sp-cmd-reloadAndRun");
    document.getElementById("sp-menu-content").removeAttribute("checked");
    reloadAndRun.setAttribute("disabled", true);
    browser.setAttribute("checked", true);
    this.executionContext = SCRATCHPAD_CONTEXT_BROWSER;
    this.notificationBox.appendNotification(
      this.strings.GetStringFromName("browserContext.notification"),
      SCRATCHPAD_CONTEXT_BROWSER,
      null,
      this.notificationBox.PRIORITY_WARNING_HIGH,
      null);
    this.resetContext();
  }
function SP_setBrowserContext ( ) { if ( this . executionContext == SCRATCHPAD_CONTEXT_BROWSER ) { return ; } let browser = document . getElementById ( "sp-menu-browser" ) ; let reloadAndRun = document . getElementById ( "sp-cmd-reloadAndRun" ) ; document . getElementById ( "sp-menu-content" ) . removeAttribute ( "checked" ) ; reloadAndRun . setAttribute ( "disabled" , true ) ; browser . setAttribute ( "checked" , true ) ; this . executionContext = SCRATCHPAD_CONTEXT_BROWSER ; this . notificationBox . appendNotification ( this . strings . GetStringFromName ( "browserContext.notification" ) , SCRATCHPAD_CONTEXT_BROWSER , null , this . notificationBox . PRIORITY_WARNING_HIGH , null ) ; this . resetContext ( ) ; }
Set the current execution context to be the most recent chrome window.
Set the current execution context to be the most recent chrome window .