Function: createDropZone()
function createDropZone(element, options?): DropZoneInstance;
Defined in: dom/src/file/drop-zone.ts:73
Take files dropped onto an element.
const zone = createDropZone(element, {
accept: 'audio/*',
onDrop: (files) => load(files[0]),
})
The element needs no attribute of its own: a drop target is made by
cancelling dragover, which this does.
Parameters
| Parameter | Type |
|---|---|
element | Element |
options | DropZoneOptions |