B2G/gecko/browser/devtools/webconsole/webconsole.js
/**
 * Create a JSTerminal (a JavaScript command line). This is attached to an
 * existing HeadsUpDisplay (a Web Console instance). This code is responsible
 * with handling command line input, code evaluation and result output.
 *
 * @constructor
 * @param object aWebConsoleFrame
 *        The WebConsoleFrame object that owns this JSTerm instance.
 */
Create a JSTerminal (a JavaScript command line). This is attached to an
existing HeadsUpDisplay (a Web Console instance). This code is responsible
with handling command line input, code evaluation and result output.

@constructor
@param object aWebConsoleFrame
The WebConsoleFrame object that owns this JSTerm instance.
Create a JSTerminal ( a JavaScript command line ) . This is attached to an existing HeadsUpDisplay ( a Web Console instance ) . This code is responsible with handling command line input code evaluation and result output . @constructor @param object aWebConsoleFrame The WebConsoleFrame object that owns this JSTerm instance .
function JSTerm(aWebConsoleFrame)
{
  this.hud = aWebConsoleFrame;
  this.hudId = this.hud.hudId;
  this.lastCompletion = { value: null };
  this.history = [];
  this.historyIndex = 0;
  this.historyPlaceHolder = 0;  
  this.autocompletePopup = new AutocompletePopup(this.hud.owner.chromeDocument);
  this.autocompletePopup.onSelect = this.onAutocompleteSelect.bind(this);
  this.autocompletePopup.onClick = this.acceptProposedCompletion.bind(this);
  this._keyPress = this.keyPress.bind(this);
  this._inputEventHandler = this.inputEventHandler.bind(this);
  this._initUI();
}
function JSTerm ( aWebConsoleFrame ) { this . hud = aWebConsoleFrame ; this . hudId = this . hud . hudId ; this . lastCompletion = { value : null } ; this . history = [ ] ; this . historyIndex = 0 ; this . historyPlaceHolder = 0 ; this . autocompletePopup = new AutocompletePopup ( this . hud . owner . chromeDocument ) ; this . autocompletePopup . onSelect = this . onAutocompleteSelect . bind ( this ) ; this . autocompletePopup . onClick = this . acceptProposedCompletion . bind ( this ) ; this . _keyPress = this . keyPress . bind ( this ) ; this . _inputEventHandler = this . inputEventHandler . bind ( this ) ; this . _initUI ( ) ; }
Create a JSTerminal (a JavaScript command line).
Create a JSTerminal ( a JavaScript command line ) .
// this.history.length;