W3C home > Mailing lists > Public > whatwg@whatwg.org > November 2012

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

From: Scott González <scott.gonzalez@gmail.com>
Date: Sun, 25 Nov 2012 10:30:35 -0500
Message-ID: <CAO8i3idci4C8hkgj12rPSt4hw1C+BdNv90YxV0ECKrY45R-h6w@mail.gmail.com>
To: Ian Hickson <ian@hixie.ch>
Cc: "whatwg@lists.whatwg.org" <whatwg@lists.whatwg.org>, Mounir Lamouri <mounir@lamouri.fr>
On Tue, Nov 20, 2012 at 5:55 PM, Ian Hickson <ian@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.
Received on Sunday, 25 November 2012 16:41:53 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 30 January 2013 18:48:11 GMT