bgrins / filereader.js

A lightweight wrapper for the JavaScript FileReader interface
http://bgrins.github.com/filereader.js/
MIT License
413 stars 86 forks source link

Disable setupClipboard, ignoring paste events #21

Open pknowles opened 8 years ago

pknowles commented 8 years ago

It doesn't look like there's an interface to stop listening for paste events on <body> for example. Have I missed something?

bgrins commented 8 years ago

You are right - if you call setupClipboard right now there isn't a way to unbind it. In fact none of the setup calls allow that. I'd accept a patch to introduce that behavior. I guess the setup calls could return an object including a destroy() function, or they could check for FileReaderJS.enabled before processing anything (and the page could flip that).