W3C home > Mailing lists > Public > public-webapps@w3.org > April to June 2014

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

From: Hallvord R. M. Steen <hsteen@mozilla.com>
Date: Mon, 19 May 2014 14:42:02 -0700 (PDT)
To: Domenic Denicola <domenic@domenicdenicola.com>
Cc: Anne van Kesteren <annevk@annevk.nl>, public-webapps <public-webapps@w3.org>
Message-ID: <251894860.280847.1400535722093.JavaMail.zimbra@mozilla.com>
>> 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

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 18:14:24 UTC