Proposed functionality for spinner stepUp/stepDown
HTML 5 defines stepUp and stepDown methods for number elements, but I find the API a bit confusing. When I first used the HTML 5 API a while ago, I expected this to work:
var elem = document.getElementById('some-number');
elem.value = 5;
elem.stepUp();
alert(elem.value); // expected 6, actual 5
I then realized that stepUp and stepDown expect a parameter defining how many steps to take. To make the code work as I expected, I had to do elem.stepUp(1). When I realized this I was a bit annoyed, but I liked the ability to jump up/down multiple steps in one operation. Based on this, I'd like to propose accepting a parameter for how many steps to take, but defaulting it to 1, instead of 0, if it's not supplied. This will bring us very close to conforming to the HTML 5 spec without causing a stumbling block for the average user.