[whatwg] Exposing filenames in DataTransfer

Anne van Kesteren annevk at opera.com
Tue Oct 19 02:29:07 PDT 2010


On Tue, 19 Oct 2010 00:15:27 +0200, Daniel Cheng <dcheng at chromium.org>  
wrote:
> Sorry, I'm using "properties" as a generic term for different types of  
> data that might be set in a drag. A lot of file managers try to be  
> helpful and
> populate alternative metadata for a file. Some of this metadata contains
> file system paths. If the web dragging clipboard mirrors the native  
> dragging clipboard, then the metadata will be visible to web apps. In  
> this example, if you were on Linux with my patch, you could call
> event.dataTransfer.getData("x-special/gnome-icon-list") while handling a
> drop and the returned string would contain the file system path.

It seems wrong to expose it in a way native to a particular operating  
system so it seems better to filter it out for now even if that is more  
work. We should keep web platform APIs OS-independent.


-- 
Anne van Kesteren
http://annevankesteren.nl/



More information about the whatwg mailing list