[whatwg] [editing] HTML Editing APIs specification ready for implementer feedback
Hallvord R. M. Steen
hallvord at opera.com
Sun Jul 31 23:29:27 PDT 2011
On Thu, 28 Jul 2011 01:51:31 +0200, Ryosuke Niwa <rniwa at webkit.org> wrote:
> The return value of queryCommandEnable depends on beforecut, beforecopy,
> and beforepaste events and selection state in WebKit;
This is actually a use case for before* events I wasn't aware of.
Interesting. I guess you've taken this behaviour from IE? It seems a bit
complicated though, in the sense that if the script knows some condition
that means copy/cut/paste should not be available, listening for an event
to cancel it is a bit of a convoluted way to make that logic available to
other parts of the script. But then, I guess using same way to communicate
state to the browser's UI and to other scripts is simplifying.
(I still haven't added anything about before* events to the CCnP spec,
because I'm unsure if they are used and whether they are a nice way to
solve the use case.)
--
Hallvord R. M. Steen, Core Tester, Opera Software
http://www.opera.com http://my.opera.com/hallvors/
More information about the whatwg
mailing list