Is there a mozilla equivalent for webkitGetAsEntry?

Now that webkitGetAsEntry () is activated in Chrome 21 to allow folder drag and drop and drop, is there an equivalent in mozilla - mozGetAsEntry (), getAsEntry () or something else? I managed to find very minimal information about the webkit method and whatwg clause; I can not find anything for Firefox (or any other browsers).

Literature:

  • http://wiki.whatwg.org/wiki/DragAndDropEntries#DataTransferItem.getAsEntry.28.29
  • http://updates.html5rocks.com/2012/07/Drag-and-drop-a-folder-onto-Chrome-now-available
  • http://blog.protonet.info/post/26894439416/html5-drag-drop-files-and-folders
+7
source share
1 answer

What you are looking for is the mozGetDataAt() method, which returns an nsIFile object:

https://developer.mozilla.org/En/DragDrop/Recommended_Drag_Types#file

So, to answer your question, the equivalent would be as follows:

mozEntry = event.dataTransfer.mozGetDataAt(0);

or..

event.dataTransfer.mozGetDataAt(0).isFile() etc.

Documentation for nsIFile (contains the fields found in web cava entries): https://developer.mozilla.org/en/XPCOM_Interface_Reference/nsIFile

+1
source

All Articles