B2G/gecko/browser/devtools/webconsole/webconsole.js
/**
   * Update an output message to reflect the latest state of a network request,
   * given a network event actor ID.
   *
   * @private
   * @param string aActorId
   *        The network event actor ID for which you want to update the message.
   */
Update an output message to reflect the latest state of a network request,
given a network event actor ID.

@private
@param string aActorId
The network event actor ID for which you want to update the message.
Update an output message to reflect the latest state of a network request given a network event actor ID . @private @param string aActorId The network event actor ID for which you want to update the message .
function WCF__updateNetMessage(aActorId)
  {
    let networkInfo = this._networkRequests[aActorId];
    if (!networkInfo || !networkInfo.node) {
      return;
    }
    let messageNode = networkInfo.node;
    let updates = networkInfo.updates;
    let hasEventTimings = updates.indexOf("eventTimings") > -1;
    let hasResponseStart = updates.indexOf("responseStart") > -1;
    let request = networkInfo.request;
    let response = networkInfo.response;
    if (hasEventTimings || hasResponseStart) {
      let status = [];
      if (response.httpVersion && response.status) {
        status = [response.httpVersion, response.status, response.statusText];
      }
      if (hasEventTimings) {
        status.push(l10n.getFormatStr("NetworkPanel.durationMS",
                                      [networkInfo.totalTime]));
      }
      let statusText = "[" + status.join(" ") + "]";
      let linkNode = messageNode.querySelector(".webconsole-msg-link");
      let statusNode = linkNode.querySelector(".webconsole-msg-status");
      statusNode.setAttribute("value", statusText);
      messageNode.clipboardText = [request.method, request.url, statusText]
                                  .join(" ");
      if (hasResponseStart && response.status >= MIN_HTTP_ERROR_CODE &&
          response.status <= MAX_HTTP_ERROR_CODE) {
        this.setMessageType(messageNode, CATEGORY_NETWORK, SEVERITY_ERROR);
      }
    }
    if (messageNode._netPanel) {
      messageNode._netPanel.update();
    }
  }
function WCF__updateNetMessage ( aActorId ) { let networkInfo = this . _networkRequests [ aActorId ] ; if ( ! networkInfo || ! networkInfo . node ) { return ; } let messageNode = networkInfo . node ; let updates = networkInfo . updates ; let hasEventTimings = updates . indexOf ( "eventTimings" ) > - 1 ; let hasResponseStart = updates . indexOf ( "responseStart" ) > - 1 ; let request = networkInfo . request ; let response = networkInfo . response ; if ( hasEventTimings || hasResponseStart ) { let status = [ ] ; if ( response . httpVersion && response . status ) { status = [ response . httpVersion , response . status , response . statusText ] ; } if ( hasEventTimings ) { status . push ( l10n . getFormatStr ( "NetworkPanel.durationMS" , [ networkInfo . totalTime ] ) ) ; } let statusText = "[" + status . join ( " " ) + "]" ; let linkNode = messageNode . querySelector ( ".webconsole-msg-link" ) ; let statusNode = linkNode . querySelector ( ".webconsole-msg-status" ) ; statusNode . setAttribute ( "value" , statusText ) ; messageNode . clipboardText = [ request . method , request . url , statusText ] . join ( " " ) ; if ( hasResponseStart && response . status >= MIN_HTTP_ERROR_CODE && response . status <= MAX_HTTP_ERROR_CODE ) { this . setMessageType ( messageNode , CATEGORY_NETWORK , SEVERITY_ERROR ) ; } } if ( messageNode . _netPanel ) { messageNode . _netPanel . update ( ) ; } }
Update an output message to reflect the latest state of a network request,
 given a network event actor ID.
Update an output message to reflect the latest state of a network request given a network event actor ID .