Extends
Type Definitions
-
A drag-end event.
Properties:
Name Type Description acceptedbool (default:
false) Set totrueto accept the event.originalDragEvent [readonly] The original HTML5 DragEvent object.
-
A drag event.
Use the
setDatamethod to add payload data of various types and specify the allowed operations with theeffectAllowedproperty. The drag operation only starts if you setacceptedtotrue.Properties:
Name Type Description acceptedbool (default:
false) Set totrueto accept the event.effectAllowedstring (default:
"copy") Set to control the allowed drop effect. One ofcopy|copyLink|copyMove|link|linkMove|all.originalDragEvent [readonly] The original HTML5 DragEvent object.
setDatafunction Takes two strings
typeandvaluefor the MIME type and the data contents, respectively.
Events
-
Is triggered when the drag operation has ended.
Note: There is no reliable way in browsers to check if the drag operation ended successfully or was cancelled.
Name Type Description eventhtml.Draggable.DragEndEvent The event object.
-
Is triggered when a drag operation is being started.
Name Type Description eventhtml.Draggable.DragEvent The event object.
Example
onDragStart: ev => { ev.setData("text/plain", "This is some text."); ev.effectAllowed = "copy"; ev.accepted = true; }