B2G/gecko/browser/devtools/debugger/debugger-controller.js
/**
   * Load the editor with the script text if available, otherwise fire an event
   * to load and display the script text.
   *
   * @param object aScript
   *        The script object coming from the active thread.
   * @param object aOptions [optional]
   *        Additional options for showing the script. Supported options:
   *        - targetLine: place the editor at the given line number.
   */
Load the editor with the script text if available, otherwise fire an event
to load and display the script text.

@param object aScript
The script object coming from the active thread.
@param object aOptions [optional]
Additional options for showing the script. Supported options:
- targetLine: place the editor at the given line number.
Load the editor with the script text if available otherwise fire an event to load and display the script text . @param object aScript The script object coming from the active thread . @param object aOptions [ optional ] Additional options for showing the script . Supported options : - targetLine : place the editor at the given line number .
function SS_showScript(aScript, aOptions = {}) {
    if (aScript.loaded) {
      if (aScript.url === DebuggerView.Scripts.selected) {
        this._onShowScript(aScript, aOptions);
      }
      return;
    }
    let editor = DebuggerView.editor;
    editor.setMode(SourceEditor.MODES.TEXT);
    editor.setText(L10N.getStr("loadingText"));
    editor.resetUndo();
    DebuggerController.dispatchEvent("Debugger:LoadSource", {
      script: aScript,
      options: aOptions
    });
  }
function SS_showScript ( aScript , aOptions = { } ) { if ( aScript . loaded ) { if ( aScript . url === DebuggerView . Scripts . selected ) { this . _onShowScript ( aScript , aOptions ) ; } return ; } let editor = DebuggerView . editor ; editor . setMode ( SourceEditor . MODES . TEXT ) ; editor . setText ( L10N . getStr ( "loadingText" ) ) ; editor . resetUndo ( ) ; DebuggerController . dispatchEvent ( "Debugger:LoadSource" , { script : aScript , options : aOptions } ) ; }
Load the editor with the script text if available, otherwise fire an event
 to load and display the script text.
Load the editor with the script text if available otherwise fire an event to load and display the script text .
// Scripts may take a longer time to load than expected, therefore the // required one may change at any time after a previous request was made. // Notify that we need to load a script file.