W3C home > Mailing lists > Public > whatwg@whatwg.org > July 2011

[whatwg] [editing] HTML Editing APIs specification ready for implementer feedback

From: Hallvord R. M. Steen <hallvord@opera.com>
Date: Mon, 01 Aug 2011 08:29:27 +0200
Message-ID: <op.vziuzdqga3v5gv@hr-opera.oslo.opera.com>
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/
Received on Sunday, 31 July 2011 23:29:27 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:35 UTC