Type Definition wry::FileDropHandler[][src]

type FileDropHandler = Box<dyn Fn(FileDropEvent) -> bool + Send>;

A listener closure to process incoming FileDropEvent of the window.

Blocking OS Default Behavior

Return true in the callback to block the OS’ default behavior of handling a file drop.

Note, that if you do block this behavior, it won’t be possible to drop files on <input type="file"> forms. Also note, that it’s not possible to manually set the value of a <input type="file"> via JavaScript for security reasons.