Re: textInput --> beforeInput

Hi, Ojan-

Ojan Vafai wrote (on 8/27/10 4:34 PM):
> Is there consensus on the following changes?
>
> 1. Rename textInput to beforeInput.

That's only really relevant if we are going to make textInput into a 
general insertion event, rather than one just for text.


> 2. Fire beforeInput for any user-action that modifies the DOM, not just
> actions that cause text to get inserted.

That's more like a mutation event, not a 'textInput' event, and mutation 
events are pretty widely reviled by implementers (though useful when 
implemented); they seem to be difficult to implement efficiently.  We 
have deprecated Mutation Events in DOM3 Events, though there are still 
going to be implementations for a while.

There are proposals to replace Mutation Events with a new, more 
efficient notification mechanism... I think what you are describing may 
fit better with that model.

The changes you are suggesting are rather dramatic; they would 
completely change the 'textInput' event.  My personal preference would 
be to keep 'textInput' the way it is, a dedicated event for character 
data, and if necessary, add a different event to cover the cases you're 
describing.  What do you see as the disadvantages of that approach?


> Looking at the history of this thread, it seems that everyone who has
> commented agrees with making these changes.

As far as I can see, the only person who specifically commented on the 
name change was Jacob Rossi, who said [1]:
[[
I don't particularly care. But since this event only applies to
character data I see no problem with it as named (textInput).
]]

I didn't see comments from any other implementers, such as Mozilla, 
Microsoft, Opera, or Apple; I would like to hear from them before making 
any change.

[1] http://lists.w3.org/Archives/Public/www-dom/2010AprJun/0087.html

Regards-
-Doug Schepers
W3C Team Contact, SVG and WebApps WGs

Received on Friday, 27 August 2010 21:17:46 UTC