Open kieuminhcanh opened 5 months ago
Have a similar need dealing with json imports.
85% sure though this is a limitation of the underlying web DnD API and imagine exists, among other reasons, to prevent snoopers from reading files the user is dragging over a browser window en route to another screen destination.
That said, I’d be curious if there’s an idiomatic way for a child target to hand off drop handling after accepting the drop, reading the file content, and concluding it can’t be handled at that level after all.
👋 source.items
and source.getStringData
is will only return populated data in onDrop()
. Before then, all you have access to is .types
.
source.items
and source.getStringData()
are only available to use at all in onDrop()
I have no way to get the value of the source to perform a comparison in the canDrop and onDrag functions.