
This does not implement any of the IDL methods, but GitHub requires the interface exists to upload files via an <input type="file"> element. Their JS handles uploads via this element and via drag-and-drop in one function, and check if the uploaded file is `instanceof DataTransfer` to decide how to handle it.
19 lines
696 B
Text
19 lines
696 B
Text
// https://html.spec.whatwg.org/multipage/dnd.html#datatransfer
|
|
[Exposed=Window]
|
|
interface DataTransfer {
|
|
constructor();
|
|
|
|
// FIXME: attribute DOMString dropEffect;
|
|
// FIXME: attribute DOMString effectAllowed;
|
|
|
|
// FIXME: [SameObject] readonly attribute DataTransferItemList items;
|
|
|
|
// FIXME: undefined setDragImage(Element image, long x, long y);
|
|
|
|
// old interface
|
|
// FIXME: readonly attribute FrozenArray<DOMString> types;
|
|
// FIXME: DOMString getData(DOMString format);
|
|
// FIXME: undefined setData(DOMString format, DOMString data);
|
|
// FIXME: undefined clearData(optional DOMString format);
|
|
// FIXME: [SameObject] readonly attribute FileList files;
|
|
};
|