Calls a function when the user drops a file on the element.
The first parameter, callback
, is a function to call once the file loads. The callback function should have one parameter, file
, that's a p5.File object. If the user drops multiple files on the element, callback
, is called once for each file.
The second parameter, fxn
, is a function to call when the browser detects one or more dropped files. The callback function should have one parameter, event
, that's a DragEvent.
예제
구문
drop(callback, [fxn])
매개변수
callback
Function:
called when a file loads. Called once for each file dropped.
fxn
Function:
called once when any files are dropped.
Notice any errors or typos? Please let us know. Please feel free to edit src/dom/dom.js and open a pull request!