B2G/gecko/browser/devtools/webconsole/webconsole.js
/**
   * Output a message from the queue.
   *
   * @private
   * @param nsISupportsString aHudIdSupportsString
   *        The HUD ID as an nsISupportsString.
   * @param array aItem
   *        An item from the output queue - this item represents a message.
   * @return nsIDOMElement|undefined
   *         The DOM element of the message if the message is visible, undefined
   *         otherwise.
   */
Output a message from the queue.
@private
@param nsISupportsString aHudIdSupportsString
The HUD ID as an nsISupportsString.
@param array aItem
An item from the output queue - this item represents a message.
@return nsIDOMElement|undefined
The DOM element of the message if the message is visible, undefined
otherwise.
Output a message from the queue . @private @param nsISupportsString aHudIdSupportsString The HUD ID as an nsISupportsString . @param array aItem An item from the output queue - this item represents a message . @return nsIDOMElement|undefined The DOM element of the message if the message is visible undefined otherwise .
function WCF__outputMessageFromQueue(aHudIdSupportsString, aItem)
  {
    let [category, methodOrNode, args] = aItem;
    let node = typeof methodOrNode == "function" ?
               methodOrNode.apply(this, args || []) :
               methodOrNode;
    if (!node) {
      return;
    }
    let afterNode = node._outputAfterNode;
    if (afterNode) {
      delete node._outputAfterNode;
    }
    let isFiltered = this.filterMessageNode(node);
    let isRepeated = false;
    if (node.classList.contains("webconsole-msg-cssparser")) {
      isRepeated = this.filterRepeatedCSS(node);
    }
    if (!isRepeated &&
        !node.classList.contains("webconsole-msg-network") &&
        (node.classList.contains("webconsole-msg-console") ||
         node.classList.contains("webconsole-msg-exception") ||
         node.classList.contains("webconsole-msg-error"))) {
      isRepeated = this.filterRepeatedConsole(node);
    }
    let lastVisible = !isRepeated && !isFiltered;
    if (!isRepeated) {
      this.outputNode.insertBefore(node,
                                   afterNode ? afterNode.nextSibling : null);
      this._pruneCategoriesQueue[node.category] = true;
      if (afterNode) {
        lastVisible = this.outputNode.lastChild == node;
      }
    }
    if (node._onOutput) {
      node._onOutput();
      delete node._onOutput;
    }
    let nodeID = node.getAttribute("id");
    Services.obs.notifyObservers(aHudIdSupportsString,
                                 "web-console-message-created", nodeID);
    return lastVisible ? node : null;
  }
function WCF__outputMessageFromQueue ( aHudIdSupportsString , aItem ) { let [ category , methodOrNode , args ] = aItem ; let node = typeof methodOrNode == "function" ? methodOrNode . apply ( this , args || [ ] ) : methodOrNode ; if ( ! node ) { return ; } let afterNode = node . _outputAfterNode ; if ( afterNode ) { delete node . _outputAfterNode ; } let isFiltered = this . filterMessageNode ( node ) ; let isRepeated = false ; if ( node . classList . contains ( "webconsole-msg-cssparser" ) ) { isRepeated = this . filterRepeatedCSS ( node ) ; } if ( ! isRepeated && ! node . classList . contains ( "webconsole-msg-network" ) && ( node . classList . contains ( "webconsole-msg-console" ) || node . classList . contains ( "webconsole-msg-exception" ) || node . classList . contains ( "webconsole-msg-error" ) ) ) { isRepeated = this . filterRepeatedConsole ( node ) ; } let lastVisible = ! isRepeated && ! isFiltered ; if ( ! isRepeated ) { this . outputNode . insertBefore ( node , afterNode ? afterNode . nextSibling : null ) ; this . _pruneCategoriesQueue [ node . category ] = true ; if ( afterNode ) { lastVisible = this . outputNode . lastChild == node ; } } if ( node . _onOutput ) { node . _onOutput ( ) ; delete node . _onOutput ; } let nodeID = node . getAttribute ( "id" ) ; Services . obs . notifyObservers ( aHudIdSupportsString , "web-console-message-created" , nodeID ) ; return lastVisible ? node : null ; }
Output a message from the queue.
Output a message from the queue .