B2G/gecko/browser/devtools/webconsole/webconsole.js
/**
   * The "attachConsole" response handler.
   *
   * @private
   * @param function [aCallback]
   *        Optional function to invoke once the connection is established.
   * @param object aResponse
   *        The JSON response object received from the server.
   * @param object aWebConsoleClient
   *        The WebConsoleClient instance for the attached console, for the
   *        specific tab we work with.
   */
The "attachConsole" response handler.
@private
@param function [aCallback]
Optional function to invoke once the connection is established.
@param object aResponse
The JSON response object received from the server.
@param object aWebConsoleClient
The WebConsoleClient instance for the attached console, for the
specific tab we work with.
The " attachConsole " response handler . @private @param function [ aCallback ] Optional function to invoke once the connection is established . @param object aResponse The JSON response object received from the server . @param object aWebConsoleClient The WebConsoleClient instance for the attached console for the specific tab we work with .
function WCCP__onAttachConsole(aCallback, aResponse, aWebConsoleClient)
  {
    if (aResponse.error) {
      Cu.reportError("attachConsole failed: " + aResponse.error + " " +
                     aResponse.message);
      return;
    }
    this.webConsoleClient = aWebConsoleClient;
    this._hasNativeConsoleAPI = aResponse.nativeConsoleAPI;
    let msgs = ["PageError", "ConsoleAPI"];
    this.webConsoleClient.getCachedMessages(msgs,
      this._onCachedMessages.bind(this, aCallback));
  }
function WCCP__onAttachConsole ( aCallback , aResponse , aWebConsoleClient ) { if ( aResponse . error ) { Cu . reportError ( "attachConsole failed: " + aResponse . error + " " + aResponse . message ) ; return ; } this . webConsoleClient = aWebConsoleClient ; this . _hasNativeConsoleAPI = aResponse . nativeConsoleAPI ; let msgs = [ "PageError" , "ConsoleAPI" ] ; this . webConsoleClient . getCachedMessages ( msgs , this . _onCachedMessages . bind ( this , aCallback ) ) ; }
The "attachConsole" response handler.
The " attachConsole " response handler .