B2G/gecko/browser/base/content/newtab/dropTargetShim.js
/**
   * Handles the 'drag' event and determines the current drop target.
   * @param aEvent The 'drag' event.
   */
Handles the 'drag' event and determines the current drop target.
@param aEvent The 'drag' event.
Handles the ' drag ' event and determines the current drop target . @param aEvent The ' drag ' event .
function DropTargetShim_drag(aEvent) {
    let target = this._findDropTarget(aEvent);
    if (target != this._lastDropTarget) {
      if (this._lastDropTarget)
        this._dispatchEvent(aEvent, "dragexit", this._lastDropTarget);
      if (target)
        this._dispatchEvent(aEvent, "dragenter", target);
      if (this._lastDropTarget)
        this._dispatchEvent(aEvent, "dragleave", this._lastDropTarget);
      this._lastDropTarget = target;
    }
  }
function DropTargetShim_drag ( aEvent ) { let target = this . _findDropTarget ( aEvent ) ; if ( target != this . _lastDropTarget ) { if ( this . _lastDropTarget ) this . _dispatchEvent ( aEvent , "dragexit" , this . _lastDropTarget ) ; if ( target ) this . _dispatchEvent ( aEvent , "dragenter" , target ) ; if ( this . _lastDropTarget ) this . _dispatchEvent ( aEvent , "dragleave" , this . _lastDropTarget ) ; this . _lastDropTarget = target ; } }
Handles the 'drag' event and determines the current drop target.
Handles the ' drag ' event and determines the current drop target .
// Let's see if we find a drop target. // We left the last drop target. // We're now hovering a (new) drop target. // We left the last drop target.