[whatwg] <details> members

Ian Hickson ian at hixie.ch
Fri Aug 3 23:40:08 PDT 2007

On Wed, 21 Feb 2007, Anne van Kesteren wrote:
> On Tue, 20 Feb 2007 21:01:14 +0100, Ian Hickson <ian at hixie.ch> wrote:
> > > I think it would be more consistent to have .defaultOpen besides .open
> > > to reflect the content attribute. .open would then reflect the current
> > > state. Consistent with form controls, that is.
> > 
> > I intentionally broke consistency here to avoid the mess that the 
> > .defaultFoo stuff has caused over the years. Do you disagree with this 
> > decision?
> Yeah. The .defaultFoo stuff has set the standard. I think it might be 
> confusing if we move away from that for new elements.

I don't know. Currently, the only elements that use defaultFoo are 
<option> with defaultSelected, <input> with defaultValue and 
defaultChecked, and <textarea> and <output> with defaultValue. Given that 
only the first three map to attributes (the last two map to textContent), 
and that in all five cases the "default"ness is directly related to the 
fact that they can be reset using .reset() and reset buttons, I'm not 
convinced that there really is a strong precedent here. The <details> 
element's "open" attribute is quite a different beast, IMHO. Could you 
elaborate on how this could be confusing? I'm not sure I really understand 
why authors would have problems with this.

Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'

More information about the whatwg mailing list