How do you do this? I'm looking to do it for the clipboard API. Browsers should be able to block copy and paste.
For copy-paste: dom.event.clipboardevents.enabled=false I would guess.
> In Firefox you can completely disable beforeunload events by setting dom.disable_beforeunload to true in about:config. Extensions may be needed for other browsers.
A word of caution: I'm not 100% sure, but I wonder if some web collaboration tools might use this to ensure data has been synced with a server.
Having said that, it should never be the end of the world to disable, sites should never have data loss due to this event missing, because if so, they already have a data loss problem when for instance the power goes out.