[webkit-dev] beforeinput and input events for contenteditable/designMode

Ojan Vafai ojan at chromium.org
Wed Feb 10 16:56:38 PST 2010

We'd like to implement this event and want to make sure there's no
opposition before moving forward. I don't expect this to require huge
rewrites to current webkit code, but it will definitely require some
plumbing to make it so that all user-gestures that modify the DOM go through
this codepath.

The proposal is that the input event be fired for any user-gesture that
results in a modification to the DOM. This matches the input event for text
controls. We'd like to add an 'action' property (open to better names) that
indicates what the user-gesture was (e.g. paste, deleteword,
undo, inserttext, etc). The goal is to simplify monitoring of changes to
rich-text regions and to enable use-cases where the data is stored in a
different model than HTML. This is needed so that, for example, an undo
operation can be applied correctly on the model as well as the DOM.

The beforeinput event would fire before the DOM is modified and is
cancelable. I don't think this should be too much more work than adding the
input event, an exception might need to be made for IME input here though.
Specifically, it might be hard to make IME events cancelable.

More details:
Initial whatwg thread:
Hixie's response:

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20100210/449e102a/attachment.html>

More information about the webkit-dev mailing list