Re: Vibration: throwing and pause

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

I'm not aware of any bugs that have been filed about us throwing, if
that's what you mean.

I kind of like the fact that we throw, since otherwise it's impossible
for developers to know if their time/pattern has exceeded the UA's
arbitrary constraints.  Although the UA does in fact have other
opportunities not to run the requested vibration, it seems useful to
me for the UA to inform the page "you've got no chance with this one."

But I don't feel strongly about this, and I'm happy to defer to Anne's
judgement.

>> Also, I think the IDL should say "(unsigned long or sequence<unsigned
>> long>) pattern"
>
> The IDL change seems proper, and matches implementations IIUC. Justin?

I don't know how (unsigned long or sequence<unsigned long>) is different, in
practical terms, from the overloads (unsigned long) and (unsigned long[]) that
we have now.  So I probably don't have an opinion on this.  :)

>>>> 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.

The method is definitely not intended to be synchronous in Firefox's
implementation.

I don't even know what it means to synchronously do an operation like this.
Obviously the vibrate() call doesn't block until the phone starts
moving, or something like that.

Could you elaborate on how making this method sync and spinning the event loop
impacts content authors?  I agree with Anne that making this sync seems Very
Bad.

-Justin

Received on Friday, 12 April 2013 20:58:08 UTC