W3C home > Mailing lists > Public > public-webapps@w3.org > October to December 2008

RE: [DOML3 Events] DOMCharacterDataModified frequency?

From: Travis Leithead <Travis.Leithead@microsoft.com>
Date: Thu, 6 Nov 2008 14:45:01 -0800
To: "olli@pettay.fi" <olli@pettay.fi>
CC: "public-webapps@w3.org" <public-webapps@w3.org>
Message-ID: <0003CB8B8FE2154EB50431DB2B8F69C017322BC89A@NA-EXMSG-W601.wingroup.windeploy.ntdev.microsoft.com>

If this is agreeable behavior (and I think it's fine, though really verbose and taxing for performance reasons), we should consider making a remark in DOM L3 Events to the effect of: this event is dispatched for each incremental change to the CharacterData (for example when a UA is in an editing mode such as HTML's contenteditable).

-----Original Message-----
From: Olli Pettay [mailto:Olli.Pettay@helsinki.fi]
Sent: Thursday, November 06, 2008 2:29 PM
To: Travis Leithead
Cc: public-webapps@w3.org
Subject: Re: [DOML3 Events] DOMCharacterDataModified frequency?

On 11/07/2008 12:03 AM, Travis Leithead wrote:
> I recently found an email thread from waaaay back where some internal folks at Microsoft had come to the IE team asking about our support for Mutation Events. They had a concern with the current DOM L3 Spec's DOMCharacterDataModified event because of its lack of specificity. I just found this email and thought I'd summarize some of the issues in hopes of starting a productive discussion about how to address them (or not).
>
> This team was building some kind of networked editing synchronization tool (sorta like MS OneNote-which you should try if you haven't already-very cool) and they needed their webapp to respond to changes in a text node (CharacterData) while the user is typing to synchronize the changes over the network. Specially, regarding the DOMCharacterDataModified event, they wanted to know:
>
> * How frequently is it supposed to fire? (For example during editing (i.e., contenteditable) does it fire per-character change [super verbose] or only after a some cumulative number of changes?
> * Is there an easier way to know exactly "what" changed? The event as spec'd right now (in DOM L2 and L3 events) provides the prevValue and newValue properties which can be used to analyze the difference. It seems like DOM L3 could provide additional help by additionally including a range (DOM L2 Range) object with the exact changed text in it.
>
> I haven't investigated other browser implementations yet, I just wanted to throw this out there for comments.

Opera doesn't seem to dispatch DOMCharacterDataModified when modifying contentEditable, webkit and gecko dispatch for
each key press (and that is what I think the behavior should be).


-Olli

>
> -Travis
>
>
Received on Thursday, 6 November 2008 22:44:54 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 18:49:28 GMT