Skip to main content

click

static click = (e, target, currentTarget_f, target_f)

DragAndDrop.click is just an extended click event, that executes a function for target and currentTarget, when currentTarget is clicked. Rarely used.

Example directly from demo website:

win_fullsize.addEventListener("click", e => {
DragAndDrop.click(e, `#${win.id}`, undefined, fullsize);
});

When you click fullscreen button on the window, it becomes bigger.

This function just makes sometimes code faster and smaller.