Skip to content

$dragIn

the method is called when an item is moved into a possible drop landing during dnd

function $dragIn(
// a DOM element on which a dnd action started
source: HTMLElement,
// a DOM element of a possible drop landing
target: HTMLElement,
// a native HTML event
ev: Event
): HTMLElement

HTMLElement a DOM element which will be saved as a drop target (to ignore a drop landing, return a null value)

You can override it with your own logic, but check drag-n-drop related events first, as they provide a much more convenient way for drag-n-drop handling.

Articles