[whatwg] Mutation Observer arguments format

Brian Kardell bkardell at gmail.com
Mon Mar 11 17:44:46 PDT 2013

On Mar 11, 2013 8:41 PM, "Alex Russell" <slightlyoff at google.com> wrote:
> Hi all,
> I had a moment today while trying to use Mutation Observers where it
> clear to me what bits of the configuration passed to observe() are
> and which are configuration about required values. In particular, the
> "subtree" and "childList" feel like they should be peers, but it seems
> they're not.
> After a quick chat with Adam Klein, it seems like it might be easier to
> understand if the "childList", "attributes", and "characterData"
> of the configuration bag were rolled into a single value, e.g. "type" or
> "types". The observe() might then be written as:
>     observer.observe(node, { types: ["attributes", "childList"], subtree:
> true });
> This breaks the types of observation into a separate bag from the
> configuration for those observations.
> Thoughts?

Yes, i really like it :)

More information about the whatwg mailing list