B2G/gecko/browser/devtools/webconsole/webconsole.js
/**
   * Add the mouse event handlers needed to make a link.
   *
   * @private
   * @param nsIDOMNode aNode
   *        The node for which you want to add the event handlers.
   * @param function aCallback
   *        The function you want to invoke on click.
   */
Add the mouse event handlers needed to make a link.
@private
@param nsIDOMNode aNode
The node for which you want to add the event handlers.
@param function aCallback
The function you want to invoke on click.
Add the mouse event handlers needed to make a link . @private @param nsIDOMNode aNode The node for which you want to add the event handlers . @param function aCallback The function you want to invoke on click .
function WCF__addMessageLinkCallback(aNode, aCallback)
  {
    aNode.addEventListener("mousedown", function(aEvent) {
      this._startX = aEvent.clientX;
      this._startY = aEvent.clientY;
    }, false);
    aNode.addEventListener("click", function(aEvent) {
      if (aEvent.detail != 1 || aEvent.button != 0 ||
          (this._startX != aEvent.clientX &&
           this._startY != aEvent.clientY)) {
        return;
      }
      aCallback(this, aEvent);
    }, false);
  }
function WCF__addMessageLinkCallback ( aNode , aCallback ) { aNode . addEventListener ( "mousedown" , function ( aEvent ) { this . _startX = aEvent . clientX ; this . _startY = aEvent . clientY ; } , false ) ; aNode . addEventListener ( "click" , function ( aEvent ) { if ( aEvent . detail != 1 || aEvent . button != 0 || ( this . _startX != aEvent . clientX && this . _startY != aEvent . clientY ) ) { return ; } aCallback ( this , aEvent ) ; } , false ) ; }
Add the mouse event handlers needed to make a link.
Add the mouse event handlers needed to make a link .