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

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

From: Domenic Denicola <domenic@domenicdenicola.com>
Date: Mon, 19 May 2014 14:29:39 +0000
To: Anne van Kesteren <annevk@annevk.nl>, "Hallvord R. M. Steen" <hsteen@mozilla.com>
CC: public-webapps <public-webapps@w3.org>
Message-ID: <1400509788130.63140@domenicdenicola.com>
From: annevankesteren@gmail.com <annevankesteren@gmail.com> on behalf of Anne van Kesteren <annevk@annevk.nl>

> 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();
}

in the constructor, and

this.[[parentEvent]].preventDefault();

inside the definition of DataTransfer.prototype.setData (which thus has to retain a private reference to its parent event).

The latter might be tricky to monkey-patch into HTML, but the former at least seems straightforward.
Received on Monday, 19 May 2014 14:30:11 UTC

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