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

Re: Clipboard API spec should specify beforecopy, beforecut, and beforepaste events

From: Ryosuke Niwa <rniwa@webkit.org>
Date: Tue, 1 May 2012 23:27:09 -0700
Message-ID: <CABNRm63nLf6hb-3doVmt58wmWsyJjkKwiOHqzzdicPvWm42nVg@mail.gmail.com>
To: Aryeh Gregor <ayg@aryeh.name>
Cc: Boris Zbarsky <bzbarsky@mit.edu>, Scott González <scott.gonzalez@gmail.com>, public-webapps <public-webapps@w3.org>
On Tue, May 1, 2012 at 11:23 PM, Aryeh Gregor <ayg@aryeh.name> wrote:

> For the former, I'd suggest onbeforecontextmenu, with some way to
> disable specific options, like extra boolean parameters (or a
> dictionary) on the event.  So you'd do something like
> addEventListener("beforecontextmenu", function(e) { if (foo()) {
> e.enabledOptions.cut = e.enabledOptions.copy = false }}).

Sounds like beforecut, beforecopy, and beforepaste suffice then... Maybe
these events are useful after all.

 The logical name for the latter is
> onbeforecut/onbeforecopy/onbeforepaste, but those are taken.  :(  Can
> we maybe repurpose them anyway?

Events for the latter are cut, copy, & paste. Despite of their names, they
fire before editing commands are executed.

- Ryosuke
Received on Wednesday, 2 May 2012 06:28:49 UTC

This archive was generated by hypermail 2.3.1 : Friday, 27 October 2017 07:26:40 UTC