Re: MutationObserver does not observe state changes

Anne van Kesteren <[email protected]>
Newsgroups gmane.comp.web.dom.general
Message-ID <CADnb78hDMWrKahyc1OaqKTdkqjsWmj-koQs_uudmAnOwmTLY7A@mail.gmail.com>
On Wed, Jul 31, 2013 at 4:11 PM, Domenic Denicola
<[email protected]> 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?


-- 
http://annevankesteren.nl/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.