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

Re: Vibration: throwing and pause

From: Kostiainen, Anssi <anssi.kostiainen@intel.com>
Date: Fri, 12 Apr 2013 20:01:46 +0000
To: "justin.lebar@gmail.com" <justin.lebar@gmail.com>, Anne van Kesteren <annevk@annevk.nl>
CC: "public-device-apis@w3.org" <public-device-apis@w3.org>
Message-ID: <8B5430E0-C3DC-49E7-9885-E370CD3666C0@intel.com>
[ + Justin ]

Hi Justin, Anne,

On Apr 12, 2013, at 8:19 PM, Anne van Kesteren <annevk@annevk.nl> wrote:

> On Fri, Apr 12, 2013 at 6:12 PM, Kostiainen, Anssi
> <anssi.kostiainen@intel.com> wrote:
>> On Apr 11, 2013, at 5:24 PM, Anne van Kesteren <annevk@annevk.nl> wrote:
>>> Since there are so many opportunities for the UA to just say "fuck it"
>>> having this method sometimes maybe throw seems more like a burden than
>>> an actual help to developers. I recommend not throwing at all.
>> This feature is shipping in Firefox for Android and Firefox OS.
>> Have you received feedback from developers that this is a burden?
> No, but given that the user agent may terminate either way (including
> without exception), it is better not to throw, especially as this it
> is implementation-dependent. You only want to throw if it's traceable
> to a clear developer error, here it's not at all clear why.

Justin - Anne would like to see vibrate() not throw. Are you aware of any related issues with the current implementation https://bugzil.la/679966?

> Also, I think the IDL should say "(unsigned long or sequence<unsigned
> long>) pattern"

The IDL change seems proper, and matches implementations IIUC. Justin?

>>> Also, "pause"?! Is that intentional?
>> This was fixed in the Editor's Draft, see "spin the event loop":
>>  http://dev.w3.org/2009/dap/vibration/
> So why does that spin the event loop?

To make the vibration pattern behave as expected. Or is there a more appropriate construct for this?

> Having this method be synchronous seems really bad.

The method is synchronous for the sake of simplicity, for the web developer that is.


Received on Friday, 12 April 2013 20:02:23 UTC

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