Skip to content

Instantly share code, notes, and snippets.

@louisfisch
Last active December 20, 2015 13:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save louisfisch/66fe6efce81aa25129eb to your computer and use it in GitHub Desktop.
Save louisfisch/66fe6efce81aa25129eb to your computer and use it in GitHub Desktop.
Reminder of HTML5 "drag and drop" API events
Event On Event Handler Description
drag ondrag Fired when an element or text selection is being dragged.
dragend ondragend Fired when a drag operation is being ended (for example, by releasing a mouse button or hitting the escape key).
dragenter ondragenter Fired when a dragged element or text selection enters a valid drop target.
dragexit ondragexit Fired when an element is no longer the drag operation's immediate selection target.
dragleave ondragleave Fired when a dragged element or text selection leaves a valid drop target.
dragover ondragover Fired when an element or text selection is being dragged over a valid drop target (every few hundred milliseconds).
dragstart ondragstart Fired when the user starts dragging an element or text selection.
drop ondrop Fired when an element or text selection is dropped on a valid drop target.

Source: HTML Drag and Drop API from MDN

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment