Re: Vibrator API: extract from Navigator

On 07/11/11 21:44, Justin Lebar wrote:
>> Having a Vibrator interface, which then Gamepad and Navigator implement,
>> hence being reusable.
>> So we then get navigator.vibrate() and gamepad.vibrate(). Same API, same
>> behavior.

Isn't this just a matter of replacing "Navigator" below with a more 
appropriate name, e.g. "Vibrator" and then specifying that the navigator 
object implements the Vibrator interface, e.g. as navigator.vibrate(1000);

partial interfaceNavigator  {
     void  vibrate  <>  (optionallong  time);
     void  vibrate  <>  (optionallong[]  pattern);

  Dave Raggett<>

Received on Tuesday, 8 November 2011 08:38:11 UTC