W3C home > Mailing lists > Public > public-webapps@w3.org > July to September 2011

Re: Mutation events replacement

From: Ryosuke Niwa <rniwa@webkit.org>
Date: Fri, 1 Jul 2011 12:59:23 -0700
Message-ID: <BANLkTin7EY9kMZPWeyCFVPCYig=93hv++A@mail.gmail.com>
To: David Flanagan <dflanagan@mozilla.com>
Cc: public-webapps <public-webapps@w3.org>
On Fri, Jul 1, 2011 at 12:53 PM, David Flanagan <dflanagan@mozilla.com>wrote:

>  On 7/1/11 12:29 PM, Ryosuke Niwa wrote:
>  I think this will be really hard to implement.  For example, consider the
> following code:
> var parent = node.parentNode;
> parent.removeChild(node);
> setTimeout(function () {parent.appendChild(node), 0);
> I'd treat that as a removal followed by an insertion. I was only talking
> about the case of calling appendChild or insertBefore on a node that is
> already in the tree.  I'd like that not to generate a remove event and then
> an insert event.

Ah I see.  I think I misunderstood you then.  You're saying that
when appendChild, insertBefore, etc... are called with a node that's already
attached in the document, you just want to know that a node has been moved
from one place to another, right?  That makes a lot of sense.  Maybe in the
mutation lists where we list an equivalent of DOMNodeInserted, we'll have a
property to indicate the old container as well as the new container.

- Ryosuke
Received on Friday, 1 July 2011 20:00:10 UTC

This archive was generated by hypermail 2.3.1 : Friday, 27 October 2017 07:26:33 UTC