Re: MutationObserver does not observe state changes

Anne van Kesteren <[email protected]>
Newsgroups gmane.comp.web.dom.general
Message-ID <CADnb78iFZk=+mim_BgYbCHHUGej43p=3hQpQ+Wxpny3QH=bUtg@mail.gmail.com>
On Wed, Jul 31, 2013 at 4:50 PM, Bradley Meck <[email protected]> wrote:
> For me if we can just get the mapped attributes that would be a win. Right
> now we have the ability to set but not read internal state using attributes.
> This leads to some confusion, because it makes attributes uni-directional,
> and not representative of state.
>
> http://jsfiddle.net/ZUMze/

No, you are not understanding how the value attribute works. The value
attribute is reflected by the defaultValue property. The value
property is internal state, and will sometimes reflect the value
attribute (because it happens to specify the default value).

This also goes for the checked attribute. It's reflected by the
defaultChecked property. I suggest studying the forms chapter of
http://www.whatwg.org/html if you're interested in this.


-- 
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.