W3C home > Mailing lists > Public > public-webapps@w3.org > April to June 2011

Re: Mutation events replacement

From: Ryosuke Niwa <rniwa@webkit.org>
Date: Thu, 30 Jun 2011 14:42:39 -0700
Message-ID: <BANLkTim2dyv74POT1TxS4ODrtB3Qc8FLtQ@mail.gmail.com>
To: David Flanagan <dflanagan@mozilla.com>
Cc: public-webapps@w3.org
On Thu, Jun 30, 2011 at 1:15 PM, David Flanagan <dflanagan@mozilla.com>wrote:
> avoid the need to maintain a list of pending callbacks.

Yeah, this is one reason I like Rafael's proposal of having a list of
mutations.  In many editing apps, you want to get a list of mutation events
for each editing action or execCommand call instead of receiving a mutation
event for each DOM mutation and having to pile them up.

a) The document tree just changed. The current state of the tree reflects
> the change and no other changes have occurred in the meantime. You can look,
> but you can't touch the tree.
> b) The document has changed, but the current state of the tree may include
> other, subsequent changes that I'm not going to tell you about yet.  Feel
> free to change the tree and mess things up even more for the next event
> handler in the queue.  :-)
> I think a is more useful, easier for web developers to understand, and less
> surprising.

Are there use cases where having just b or b + list of mutations is not
sufficient (i.e. being synchronous is necessary) ?

- Ryosuke
Received on Thursday, 30 June 2011 21:43:25 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 18:13:20 UTC