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

Le jeudi 27 octobre 2011 à 18:38 +0300, Anssi Kostiainen a écrit :
> Here's the first draft of the Vibration API spec as promised:
>   http://dev.w3.org/2009/dap/vibration/

Thanks for getting this started!

> It's basically Mozilla's implementation, with the following changes and some clarifications:
> * vibrate() is exposed on navigator.vibration instead of navigator

navigator.vibration.vibrate seems a bit redundant; but I guess that's as
good a strawman as any other proposal :)

> * two event handlers added: onvibrationstart and onvibrationend

What are the use cases for these events?

> * the exceptions raised by vibrate() are 'SyntaxError' and 'NotSupportedError'

I think the SyntaxError exception is not needed, since Web IDL gives use
TypeError for free in these cases.

Dom

Received on Friday, 28 October 2011 09:33:26 UTC