Creates a drag target interaction.
The element users can drag.
One target element, or an iterable of target elements.
The DOM operation to perform when a target accepts the drag.
The duration of generated animations, in milliseconds.
ReadonlydraggedThe element users can drag.
ReadonlytargetsThe target elements that can accept the dragged element.
Appends an event listener for events whose type is type.
The drag target event type to listen for.
The callback or event listener object that receives the event.
Optionaloptions: boolean | AddEventListenerOptionsOptions that control listener registration.
Returns the first target with the given element id.
The element id to match.
The matching target, or undefined if no target matches.
Replays a drag movement for the managed dragged element.
The dragged element and translate offset to apply.
Replays the end of an uncommitted drag operation.
The settle event detail to apply.
Replays a committed drop onto a target.
The dragged element and target element to commit.
Removes an event listener previously registered with addEventListener.
The drag target event type.
The callback or event listener object to remove.
Optionaloptions: boolean | EventListenerOptionsOptions that identify the listener registration.
Coordinates pointer dragging from one DOM element into one or more targets.
DragTargetcommits at most once. A committed drag either appends the dragged element to the target or replaces the target, depending on action.