[whatwg] Make stepUp() and stepDown() more developer-friendly

Scott González scott.gonzalez at gmail.com
Sun Nov 25 07:30:35 PST 2012

On Tue, Nov 20, 2012 at 5:55 PM, Ian Hickson <ian at hixie.ch> wrote:

> > I can list out the steps we take for all conditions, but I'd like to
> > hear everyone's thoughts on the various cases where you're suggesting
> > that the methods do nothing.
> Mostly I agree with Mounir here, but I'm curious about what you think
> should happen for the case where there's no value, and the case where the
> control isn't a numeric/date/time type. I could see an argument for
> stepping from the default in the former case (Mounir, what do you think
> about doing that?) but for the latter case I don't really see any point
> doing anything but throw an exception, as Mounir suggested.

For any non-parsable value (including no value), we start at 0, take the
step, then confine to a valid step within min/max.

I think it makes sense to throw if the control doesn't support stepping.

More information about the whatwg mailing list