Extends
Type Definitions
-
A drag-end event.
Properties:
Name Type Description accepted
bool (default:
false
) Set totrue
to accept the event.original
DragEvent [readonly] The original HTML5 DragEvent object.
-
A drag event.
Use the
setData
method to add payload data of various types and specify the allowed operations with theeffectAllowed
property. The drag operation only starts if you setaccepted
totrue
.Properties:
Name Type Description accepted
bool (default:
false
) Set totrue
to accept the event.effectAllowed
string (default:
"copy"
) Set to control the allowed drop effect. One ofcopy|copyLink|copyMove|link|linkMove|all
.original
DragEvent [readonly] The original HTML5 DragEvent object.
setData
function Takes two strings
type
andvalue
for 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 event
html.Draggable.DragEndEvent The event object.
-
Is triggered when a drag operation is being started.
Name Type Description event
html.Draggable.DragEvent The event object.
Example
onDragStart: ev => { ev.setData("text/plain", "This is some text."); ev.effectAllowed = "copy"; ev.accepted = true; }