[whatwg] a few comments to Webforms 2.0 Call For Comments

Ian Hickson ian at hixie.ch
Sun Aug 22 05:03:19 PDT 2004

On Tue, 3 Aug 2004, Brian Wilson wrote:
> I was operating under the assumption that .property for an attribute 
> would return to me the spec default value for that attribute if it was 
> not filled in for some of my test cases...I'm realizing that can't 
> really be accurate according to the letter of the spec, because all 
> these varying min/max/step defaults for different INPUT types can not be 
> enforced by the DTD since the INPUT element is so overloaded. The DTD 
> can not express this complexity adequately to allow for the varying 
> default values for these attributes.
> So - if I have
>    <input type="datetime">
> and request the field's .step property, is it ever possible to get "60" 
> legally as a default return value, or would UAs need to "hardcode" these 
> default values for each type?
> Am I just missing something here?

What you're missing is that UAs (and the spec) are not constrained by what 
DTDs can do.

The "step" DOM attribute is not the step="" content attribute (which you 
can get to by doing getAttribute("step"), incidentally).

In the case given above, "input.step" would return "60" and 
"input.getAttribute('step')" would return null.

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