- Not supported in Firefox
- Supported in Chrome
- Not supported in Safari
- Not supported in IE
- Not supported in Opera
Chrome has induce a new DownloadURL type for the drag and drop method setData. This allows you to drag a file from a webpage to the desktop.
Using a Chrome browser drag this link to desktop > Drag this
Object detection
The object detection is not very clean at the moment, but this example from box.net article seems to work.
this.addEventListener("dragstart", function(e) {
if (e.dataTransfer && e.dataTransfer.constructor == Clipboard &&
e.dataTransfer.setData('DownloadURL', 'http://example.org')) {
e.dataTransfer.setData("DownloadURL", url);
}
},false);
Object, method, and property compatibility
| Firefox 5.0 | Chrome 12.0 | Safari 5.0 | IE 9.0 | Opera 11.1 | |
| DownloadURL | No | Yes | No | No | No |
Notes
Unfortunately at the moment you cannot set multiple data types when you use the DownloadURL type.