It would be very nice to have a function that clean theses handlers. In my case I use the makeDropPane function on my document element and since the app is an SPA, new event listeners are added each time we load the component that uses filepicker but previous ones are never removed.
To do that you just need to name your functions and then call removeEventListener(event, function)
Hi,
it's impossible to remove the event listeners that are attached in the
makeDropPane
function : https://github.com/filepicker/filepicker-js/blob/8a92af4609613f4e6def509aafcb113112417553/src/widgets/dragdrop.js#L15It would be very nice to have a function that clean theses handlers. In my case I use the
makeDropPane
function on my document element and since the app is an SPA, new event listeners are added each time we load the component that uses filepicker but previous ones are never removed.To do that you just need to name your functions and then call
removeEventListener(event, function)
Thank you !