W3C home > Mailing lists > Public > www-dom@w3.org > January to March 2014

Re: MutationObserver - a better interface

From: Anne van Kesteren <annevk@annevk.nl>
Date: Tue, 11 Feb 2014 19:29:07 +0000
Message-ID: <CADnb78jBbR+Wd5f3ZamnASXVmSQTaYat4bSAzROuktRpQs9OUg@mail.gmail.com>
To: Axel Dahmen <brille1@hotmail.com>
Cc: "www-dom@w3.org" <www-dom@w3.org>
On Tue, Feb 11, 2014 at 6:34 PM, Axel Dahmen <brille1@hotmail.com> wrote:
> But, well, that's, too, even one more point for having had MutationObserver
> being a Node's member as it doesn't make any sense to observe a Node you
> don't have any more references to in code.

As I said you often do keep a reference to the node.

E.g. document.head.appendChild(document.body) will first remove
document.body and then insert it again. It would be bad if the
observer was destroyed while this operation took place as subsequent
document.body.appendChild(...) invocations would go unrecorded.

Received on Tuesday, 11 February 2014 19:29:34 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 20 October 2015 10:46:22 UTC