B2G/gecko/browser/devtools/debugger/debugger-controller.js
/**
   * Display the script source once it loads.
   *
   * @private
   * @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.
   */
Display the script source once it loads.
@private
@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.
Display the script source once it loads . @private @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__onShowScript(aScript, aOptions = {}) {
    if (aScript.text.length < SYNTAX_HIGHLIGHT_MAX_FILE_SIZE) {
      this._setEditorMode(aScript.url, aScript.contentType);
    }
    let editor = DebuggerView.editor;
    editor.setText(aScript.text);
    editor.resetUndo();
    DebuggerController.Breakpoints.updateEditorBreakpoints();
    DebuggerController.StackFrames.updateEditorLocation();
    if (aOptions.targetLine) {
      editor.setCaretPosition(aOptions.targetLine - 1);
    }
    DebuggerController.dispatchEvent("Debugger:ScriptShown", {
      url: aScript.url
    });
  }
function SS__onShowScript ( aScript , aOptions = { } ) { if ( aScript . text . length < SYNTAX_HIGHLIGHT_MAX_FILE_SIZE ) { this . _setEditorMode ( aScript . url , aScript . contentType ) ; } let editor = DebuggerView . editor ; editor . setText ( aScript . text ) ; editor . resetUndo ( ) ; DebuggerController . Breakpoints . updateEditorBreakpoints ( ) ; DebuggerController . StackFrames . updateEditorLocation ( ) ; if ( aOptions . targetLine ) { editor . setCaretPosition ( aOptions . targetLine - 1 ) ; } DebuggerController . dispatchEvent ( "Debugger:ScriptShown" , { url : aScript . url } ) ; }
Display the script source once it loads.
Display the script source once it loads .
// Handle any additional options for showing the script. // Notify that we shown script file.