W3C home > Mailing lists > Public > public-device-status@w3.org > November 2011

Re: [vibra] Vibration API -- the first stab (was: Mozilla's WebVibrator contribution)

From: Anssi Kostiainen <anssi.kostiainen@nokia.com>
Date: Tue, 1 Nov 2011 12:05:50 -0700
Cc: ext JOSE MANUEL CANTERA FONSECA <jmcf@tid.es>, "public-device-apis@w3.org WG" <public-device-apis@w3.org>, <public-device-status@w3.org>
Message-Id: <3C652D5B-DB17-4DF3-9080-C4B7A2D9F6CA@nokia.com>
To: ext Jonas Sicking <jonas@sicking.cc>
On 31.10.2011, at 9.14, ext Jonas Sicking wrote:

> On Fri, Oct 28, 2011 at 5:04 AM, Anssi Kostiainen
> <anssi.kostiainen@nokia.com> wrote:
>> On 28.10.2011, at 12.51, ext JOSE MANUEL CANTERA FONSECA wrote:
>> 
>>> In addition I'm missing
>>> 
>>> navigator.vibrator.cancel(vibrationRequest)
>> 
>> This is the same as one of the following:
>> 
>> vibrate(undefined)
>> vibrate()
>> vibrate(null)
>> vibrate(0)
>> vibrate([])
> 
> This seems a bit redundant. In particular, the first three seems
> unnecessary to support.

I agree, and I'd prefer to drop them too. They've been inherited from:

[[

 * We handle the argument to mozVibrate as follows.
 *
 * - If the argument is undefined, null, 0, or the empty list, we cancel any
 *   outstanding vibration pattern; that is, we stop the device from vibrating.

]]

So I assume we should just throw TypeError for undefined and null (or whatever WebIDL gives us for free)?

-Anssi
Received on Tuesday, 1 November 2011 19:06:35 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 1 November 2011 19:06:36 GMT