B2G/gecko/browser/devtools/webconsole/webconsole.js
/**
   * Remove a given message from the output.
   *
   * @param nsIDOMNode aNode
   *        The message node you want to remove.
   */
Remove a given message from the output.
@param nsIDOMNode aNode
The message node you want to remove.
Remove a given message from the output . @param nsIDOMNode aNode The message node you want to remove .
function WCF_removeOutputMessage(aNode)
  {
    if (aNode._objectActors && !aNode._panelOpen) {
      aNode._objectActors.forEach(this._releaseObject, this);
    }
    if (aNode.classList.contains("webconsole-msg-cssparser")) {
      let desc = aNode.childNodes[2].textContent;
      let location = "";
      if (aNode.childNodes[4]) {
        location = aNode.childNodes[4].getAttribute("title");
      }
      delete this._cssNodes[desc + location];
    }
    else if (aNode._connectionId &&
             aNode.classList.contains("webconsole-msg-network")) {
      delete this._networkRequests[aNode._connectionId];
      this._releaseObject(aNode._connectionId);
    }
    else if (aNode.classList.contains("webconsole-msg-inspector")) {
      this.pruneConsoleDirNode(aNode);
      return;
    }
    if (aNode.parentNode) {
      aNode.parentNode.removeChild(aNode);
    }
  }
function WCF_removeOutputMessage ( aNode ) { if ( aNode . _objectActors && ! aNode . _panelOpen ) { aNode . _objectActors . forEach ( this . _releaseObject , this ) ; } if ( aNode . classList . contains ( "webconsole-msg-cssparser" ) ) { let desc = aNode . childNodes [ 2 ] . textContent ; let location = "" ; if ( aNode . childNodes [ 4 ] ) { location = aNode . childNodes [ 4 ] . getAttribute ( "title" ) ; } delete this . _cssNodes [ desc + location ] ; } else if ( aNode . _connectionId && aNode . classList . contains ( "webconsole-msg-network" ) ) { delete this . _networkRequests [ aNode . _connectionId ] ; this . _releaseObject ( aNode . _connectionId ) ; } else if ( aNode . classList . contains ( "webconsole-msg-inspector" ) ) { this . pruneConsoleDirNode ( aNode ) ; return ; } if ( aNode . parentNode ) { aNode . parentNode . removeChild ( aNode ) ; } }
Remove a given message from the output.
Remove a given message from the output .