function processData(d) {
// Process the data …
}
dragTarget.addEventListener("dragend", (ev) => {
// Call the drag and drop data processor
if (ev.dataTransfer !== null) processData(ev.dataTransfer);
});DragEvent: dataTransfer property / notebook
DragEvent: dataTransfer property
Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.