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

Olav Junker Kj?r wrote:
> Should the DOM reflect default values?E.g. if a number-control does not   
> have the step attribute declared,the default step is 1. Should the DOM  
> property step then return 1 or null?

Matthew Raymond wrote:
> I'm no Javascript expert, but I believe there are actually two ways of 
> getting an attribute. One if using GetAttribute, and the other is via a 
> property of a specific element object. GetAttribute would give you the 
> value set in the markup, whereas the object property would have the value 
> used by the UA.

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

-- 
Brian Wilson
Opera Core QA

Received on Tuesday, 3 August 2004 09:33:55 UTC