15 ms·
If anyone else is wondering (as i did) how this works, I believe they're using the w3c file api. Details here: http://dev.w3.org/2006/webapi/FileAPI/ http://d
by misterbwong 17y ago
If anyone else is wondering (as i did) how this works, I believe they're using the w3c file api. Details here:
http://dev.w3.org/2006/webapi/FileAPI/ http://dev.w3.org/2006/webapi/FileAPI/
- sp332 17y agoExample code from Mozilla Hacks: http://hacks.mozilla.org/category/fileapi/ http://hacks.mozilla.org/category/fileapi/
- mgriffith 17y agoactually, they are most likely using part of the new drag and drop API in HTML5. firefox and chrome both provide a `ev.originalEvent.dataTransfer` object as part of the DragEvent interface. additionally (and importantly), they allow the drag/drop to originate from outside of the browser. see: http://decafbad.com/blog/2009/07/15/html5-drag-and-drop http://decafbad.com/blog/2009/07/15/html5-drag-and-drop and: http://hacks.mozilla.org/2009/07/html5-drag-and-drop/ http://hacks.mozilla.org/2009/07/html5-drag-and-drop/
- misterbwong 17y agod'oh. you're right. my quick google had me thinking that html5 only allowed for in browser drag/drop so I concluded that it was the file api.