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

Re: Vibration: throwing and pause

From: Anne van Kesteren <annevk@annevk.nl>
Date: Tue, 16 Apr 2013 09:55:59 +0100
Message-ID: <CADnb78j0KxF-8DCJV_13Q46wjoURVB2TamGgKwGtnmC5EUEwEA@mail.gmail.com>
To: "Kostiainen, Anssi" <anssi.kostiainen@intel.com>
Cc: Justin Lebar <justin.lebar@gmail.com>, "public-device-apis@w3.org" <public-device-apis@w3.org>
Thanks Anssi, some nits below.

On Tue, Apr 16, 2013 at 9:04 AM, Kostiainen, Anssi
<anssi.kostiainen@intel.com> wrote:
> 3. If any entry of pattern exceeds an implementation-dependent
>    limit, then return false and abort these steps.

FWIW, at some point WebApps started using "terminate" instead of
"abort" based on a comment from Art I think.

> 4. If the length of pattern is even, then remove the last entry in
>    pattern.

This does not work for an empty list.

> 7. An implementation may return false and abort the algorithm
>    at this point.

Use "these steps" here too.

> [NEW] Run the remainder of these steps asynchronously, and return
>       true from the method.

You want to use "Return true, and then continue running these steps

> 10. For each time in pattern, run the following substeps:
>    1. If the index of time is even (the first entry has index 0),
>       vibrate the device for time milliseconds.
>    2. Otherwise spin the event loop for time milliseconds.

You don't want to spin the event loop here, but simply wait.

Received on Tuesday, 16 April 2013 08:56:28 UTC

This archive was generated by hypermail 2.3.1 : Monday, 23 October 2017 14:53:58 UTC