Re: [clipboard events] implicitly prevent default event action?

>> Can you sanely explain those using a JavaScript implementation or would that be some kind of weird stack-inspecting feature?

> My impression was that it would be something like:
> 
> if (data) {
>   this.preventDefault();
> }

Domenic: thanks for explaining, that's pretty much exactly what I'm thinking of.

It's annoying and/or ugly that the code would have to be a bit scattered - given that we've grown the DataTransfer API beyond the setData() approach, there are several methods that could modify what goes on the clipboard, and to do this right calling any of them would have to trigger a preventDefault() at some point before the dispatch. So from the implementation point of view, it's a clumsy thing to do - but it would significantly simplify usage of the API..
-Hallvord

Received on Monday, 19 May 2014 21:42:32 UTC