B2G/gecko/browser/devtools/webconsole/webconsole.js
/**
   * Update the completion result. This operation is performed asynchronously by
   * fetching updated results from the content process.
   *
   * @private
   * @param int aType
   *        Completion type. See this.complete() for details.
   * @param function [aCallback]
   *        Optional, function to invoke when completion results are received.
   */
Update the completion result. This operation is performed asynchronously by
fetching updated results from the content process.

@private
@param int aType
Completion type.
Update the completion result . This operation is performed asynchronously by fetching updated results from the content process . @private @param int aType Completion type .
function JST__updateCompletionResult(aType, aCallback)
  {
    if (this.lastCompletion.value == this.inputNode.value) {
      return;
    }
    let requestId = gSequenceId();
    let input = this.inputNode.value;
    let cursor = this.inputNode.selectionStart;
    this.lastCompletion = {
      requestId: requestId,
      completionType: aType,
      value: null,
    };
    let callback = this._receiveAutocompleteProperties.bind(this, requestId,
                                                            aCallback);
    this.webConsoleClient.autocomplete(input, cursor, callback);
  }
function JST__updateCompletionResult ( aType , aCallback ) { if ( this . lastCompletion . value == this . inputNode . value ) { return ; } let requestId = gSequenceId ( ) ; let input = this . inputNode . value ; let cursor = this . inputNode . selectionStart ; this . lastCompletion = { requestId : requestId , completionType : aType , value : null , } ; let callback = this . _receiveAutocompleteProperties . bind ( this , requestId , aCallback ) ; this . webConsoleClient . autocomplete ( input , cursor , callback ) ; }
Update the completion result.
Update the completion result .
// TODO: Bug 787986 - throttle/disable updates, deal with slow/high latency // network connections.