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

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