W3C home > Mailing lists > Public > www-dom@w3.org > July to September 2013

Re: MutationObserver does not observe state changes

From: Anne van Kesteren <annevk@annevk.nl>
Date: Wed, 31 Jul 2013 16:26:02 +0100
Message-ID: <CADnb78hDMWrKahyc1OaqKTdkqjsWmj-koQs_uudmAnOwmTLY7A@mail.gmail.com>
To: Domenic Denicola <domenic@domenicdenicola.com>, Rafael Weinstein <rafaelw@google.com>, Adam Klein <adamk@chromium.org>
Cc: Bradley Meck <bradley.meck@gmail.com>, "www-dom@w3.org" <www-dom@w3.org>
On Wed, Jul 31, 2013 at 4:11 PM, Domenic Denicola
<domenic@domenicdenicola.com> wrote:
> - Mutation observers have no mechanism for working on <input> elements'
> checkedness (your original post).
> - Mutation observers have no mechanism for working on custom elements (your
> below post).
> Does that sum it up?
> I agree that this seems like a pretty bad hole in mutation observers and
> would love to hear some perspective from others on the list.

Mutation observers are for tree mutations, character data node text
mutations, and element attribute mutations. I.e. the core DOM.
Internal state of an element, such as <textarea>'s value, or whether
<details> is collapsed, is state you have to observe separately. This
is typically exposed via  events. Given that this internal state is a
per-node affair, I'm not sure we can provide a coherent API.

> I wonder how Polymer/MDV do "databinding" to e.g. the checked property of an
> input; do they just have a list of properties they need to special-case, and
> can't bind to attributes directly?

Rafael, Adam?

Received on Wednesday, 31 July 2013 15:26:29 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:37:03 UTC