- From: Anne van Kesteren <annevk@annevk.nl>
- Date: Wed, 31 Jul 2013 17:07:47 +0100
- 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. -- http://annevankesteren.nl/
Received on Wednesday, 31 July 2013 16:08:14 UTC