Frontmatter
| id | 16 |
| title | Drag & Drop implementation |
| state | Closed |
| labels | enhancementhelp wantedepic |
| assignees | [] |
| createdAt | Nov 17, 2019, 5:02 PM |
| updatedAt | Aug 31, 2024, 10:54 AM |
| githubUrl | https://github.com/neomjs/neo/issues/16 |
| author | tobiu |
| commentsCount | 1 |
| parentIssue | null |
| subIssues | [] |
| subIssuesCompleted | 0 |
| subIssuesTotal | 0 |
| blockedBy | [] |
| blocking | [] |
| closedAt | Aug 31, 2024, 10:54 AM |

I found a very nice ES6 based (MIT licensed) example here:
https://shopify.github.io/draggable/
Source example:
https://github.com/Shopify/draggable/blob/master/src/Draggable/Draggable.js
I think neo.mjs should have a similar solution.
It will get a little bit tricky with our workers setup: Main needs to send the relevant events (dragstart, dragenter, dragleave, drop) to App to execute the handler logic, which will then adjust the DOM.
The only bigger issue is the "dragover" event, which fires incredibly often (could get buffered). In case a dragover-handler only uses trivial logic (e.g. no "this"), it could get moved to the main thread.