I'm trying to transfer JSON data (instead of a string) with HTML5 drag-and--drop
When a drag is started you can set the data:
e.originalEvent.dataTransfer.setData("application/json", {x: 10});
},
And when the draggable is dropped
e.originalEvent.dataTransfer.getData("application/json");
But whatever I do, its always a string. How can I transfer an actual object ? DEMO