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