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

Olav Junker Kjær olav at olav.dk
Tue Aug 3 10:09:28 PDT 2004

I assume WF2-specifc attributes cannot be defaulted by the DTD, since
there is no DTD for WF2 :-) 

And section 7.5 says:
"The new pattern, required, autocomplete, autofocus, inputmode, min, max,
wrap, disabled, action, enctype, method and replace attributes simply
reflect the current value of their relevant content attribute."

So I would think that min/max/step DOM properties should be null when not
declared in the HTML, and that the validation code should use a hardcoded
default value in that case. This default value will not be exposed by the
DOM, then.

(The step attribute is left out of the quoted paragraph, however I assume
that is just an oversight?)

Olav Junker Kjær

> 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?
> -Brian

More information about the whatwg mailing list