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 17:07:47 +0100
Message-ID: <CADnb78iFZk=+mim_BgYbCHHUGej43p=3hQpQ+Wxpny3QH=bUtg@mail.gmail.com>
To: Bradley Meck <bradley.meck@gmail.com>
Cc: Domenic Denicola <domenic@domenicdenicola.com>, "www-dom@w3.org" <www-dom@w3.org>
On Wed, Jul 31, 2013 at 4:50 PM, Bradley Meck <bradley.meck@gmail.com> 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.

Received on Wednesday, 31 July 2013 16:08:14 UTC

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