5
0
mirror of https://github.com/wailsapp/wails.git synced 2025-05-08 03:39:37 +08:00
wails/v3/examples/html-dnd-api
2025-04-25 20:51:34 +10:00
..
assets [v3 alpha test] HTML Drag and Drop API test (#3856) 2024-10-29 20:15:36 +11:00
main.go [v3 alpha test] HTML Drag and Drop API test (#3856) 2024-10-29 20:15:36 +11:00
README.md Initial Windows testing completed. 7 issues. 2025-04-25 20:51:34 +10:00

HTML Drag and Drop API Example

This example should demonstrate whether the HTML Drag and Drop API works correctly.

Expected Behaviour

When dragging the "draggable", in the console should be printed:

  1. "dragstart" once
  2. "drag" many times
  3. "dragend" once

When dragging the "draggable" on the drop target, the inner text of the latter shoud change and in the console should be printed:

  1. "dragstart" once
  2. "drag" many times
  3. "dragenter" once
  4. "dragover" many times (alternating with "drag")
    • "drop" once (in case of a drop inside the drop target)
    • "dragleave" once (in case the draggable div leaves the drop target)
  5. "dragend" once

Running the example

To run the example, simply run the following command:

go run main.go

Building the example

To build the example in debug mode, simply run the following command:

wails3 task build