[whatwg] <input> value sanitization algorithm

Ian Hickson ian at hixie.ch
Tue Jul 30 15:35:42 PDT 2013

On Fri, 18 Jan 2013, Jonathan Watt wrote:
> In addition to the value sanitization algorithm, some input types 
> specify actions that the user agent must take when the element's value 
> is suffering from underflow/overflow or a step mismatch. To make it 
> clearer that these actions will also be run when the value sanitization 
> algorithm is run, could the text be changed to include each type's 
> underflow/overflow and step mismatch actions under the the respective 
> type's value sanitization algorithm?

The steps that say to run "when the element is suffering from a step 
mismatch" run when the element is suffering from a step mismatch. It 
doesn't matter if it happens before or after the value sanitization 
algorithm, as far as I can tell.

I don't really understand what's ambiguous here.

> (Otherwise it's unclear to me why some of the steps that are applied 
> when converting the value content attribute to the input element's value 
> have this special "value sanitization algorithm" label attached to them, 
> while others do not.)

The steps with the spec label attached are invoked by other algorithms 
(specifically, as you say, when the content attribute is changed, and also 
when the type attribute is changed, and when the element is created, and 
so forth.) The other algorithms are invoked when they say they are 
invoked, so they don't need a label -- nothing else directly invokes them.

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