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 07:55:53 -0700
Message-ID: <BANLkTin5JB5Q9Ak_od2MX+pEkSuGrz2Zig@mail.gmail.com>
To: Jonas Sicking <jonas@sicking.cc>
Cc: Olli@pettay.fi, Anne van Kesteren <annevk@opera.com>, Webapps WG <public-webapps@w3.org>
On Tue, Jun 28, 2011 at 2:24 PM, Jonas Sicking <jonas@sicking.cc> wrote:
> 1. DOMNodeRemoved is fired *before* a mutation takes place. This one's
> tricky since you have to figure out all the removals you're going to
> do, then fire events for them, and then hope that the mutations
> actually still makes sense.

In WebKit, at least, we don't do this during editing actions and
execCommand.  In particular, we've delayed DOMNodeRemoved events to fire
after all mutations are done (violating the spec).  We've got a few bug
reports saying that the event is not fired (i.e. invisible) to event
listeners on ancestor nodes because when the event is fired, the node has
already been removed.

Even before we made that change, WebKit always fired DOMNodeRemoved as we
remove nodes instead of figuring out all the removals because that's too

- Ryosuke
Received on Thursday, 30 June 2011 14:56:40 UTC

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