W3C home > Mailing lists > Public > public-device-apis@w3.org > October 2013

Re: Vibration API: clamp argument

From: Michael van Ouwerkerk <mvanouwerkerk@chromium.org>
Date: Thu, 31 Oct 2013 15:40:01 +0000
Message-ID: <CAF40kP7Ks6G_aF4Y3kLdKTHex7+jfD+JcFFUiRvLMo5tqA62tA@mail.gmail.com>
To: Dominique Hazael-Massieux <dom@w3.org>
Cc: Michael van Ouwerkerk <mvanouwerkerk@chromium.org>, "<public-device-apis@w3.org>" <public-device-apis@w3.org>
Note that there is some concern that [Clamp] cannot be applied to the
contents of a sequence:
https://www.w3.org/Bugs/Public/show_bug.cgi?id=23623

It seems even the desired syntax is not fully agreed.

Regards,

Michael


On Tue, Oct 22, 2013 at 1:07 PM, Dominique Hazael-Massieux <dom@w3.org>wrote:

> Le mardi 22 octobre 2013 à 12:23 +0100, Michael van Ouwerkerk a écrit :
> > Hi, would it make sense to add the [Clamp] attribute to the argument
> > of the vibrate method? This would be added in WebIDL.
>
> > Without it, navigator.vibrate(-1) becomes
> > navigator.vibrate(4294967295).
>
> > It seems clamping it to 0 would be a more elegant way of handling this
> > bad input.
> > What do you think?
>
> +1
>
> Dom
>
>
>
Received on Thursday, 31 October 2013 15:40:28 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 19:33:01 UTC