Documentation
¶
Overview ¶
Command dragdrop is a chromedp example demonstrating how to drag and drop with the actions DragAndDrop and DragAndDropXY. The program loads a local page with three parts. A slider has a handle that follows the mouse events. A sortable list changes its order when a person drags one item onto another item, and it also listens for mouse events. An area with HTML5 drag and drop has draggable cards and drop zones, and the page reads the text of a DataTransfer when a card drops. The same two actions work for both kinds of page. After each drag, the program asks the page what it recorded and prints the positions, the new order and the dropped text. It starts a local server and needs no internet. Use -v to print the protocol messages and -visible to show the browser window and leave it open. Use -visible-on-terminal to draw the page in the terminal with terminal graphics.