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: Jonas Sicking <jonas@sicking.cc>
Date: Tue, 1 Nov 2011 18:21:14 -0700
Message-ID: <CA+c2ei-dnEBM7rcNUF9K4UDhFSdqaZz459jmUPFCW7SA5PfAZw@mail.gmail.com>
To: Anssi Kostiainen <anssi.kostiainen@nokia.com>
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" <public-device-status@w3.org>
On Tuesday, November 1, 2011, Anssi Kostiainen <anssi.kostiainen@nokia.com>
wrote:
> 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)?

Yeah, let's just rely on WebIDL.

/ Jonas
Received on Wednesday, 2 November 2011 01:43:46 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 2 November 2011 01:43:46 GMT