Interactive tool
Test native HTML drag and drop, list sorting, file drops, and live event logs.
Drag a label from the left into the container on the right.Key points: dragstart set in effectAllowed and setData;
dragover must preventDefault() to become a drop target。
Drag items to reorder. Use getBoundingClientRect() to locate the pointer relative to each sibling, and :not(.dragging) to exclude the dragged item. During dragover events, reorder with insertBefore。
Drop files below or click to select. This demonstrates DataTransfer.files to read and display
(files are not uploaded and are displayed locally only).