I am working on drag and drop functionality on a WebView. Is there anything similar to hfs promise(cocoa environment) kind of drag and drop on html5 environment?
I am expecting something like if I pass url from where a file has to be downloaded with the clipboard that file should get downloaded where the drop occurs on say downloads folder.
There happens to be a delegate to webview using which one can get an event when an element is getting dragged.
You get the access to the pasteboard and its contents which can be used to make decisions on what what type of dragging is about to happen and leaves you with an option of changing the pasteboard and starting your own drag session or leave it alone. I will be choosing the former and implement HFS promise to download a file when the drop occurs.
I didn’t find any method using html5 alone to address the problem. However, I found html5 code that does what is required but works on chrome alone. Refer below link:(http://www.html5rocks.com/en/tutorials/casestudies/box_dnd_download/)