W3C home > Mailing lists > Public > public-device-apis@w3.org > November 2011

Re: Vibrator API: extract from Navigator

From: Dave Raggett <dsr@w3.org>
Date: Tue, 08 Nov 2011 08:37:50 +0000
Message-ID: <4EB8EA5E.7070601@w3.org>
To: public-device-apis@w3.org
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  <http://dev.w3.org/2009/dap/vibration/#widl-Navigator-vibrate-void-long-time>  (optionallong  time);
     void  vibrate  <http://dev.w3.org/2009/dap/vibration/#widl-Navigator-vibrate-void-longArray-pattern>  (optionallong[]  pattern);
};


-- 
  Dave Raggett<dsr@w3.org>  http://www.w3.org/People/Raggett
Received on Tuesday, 8 November 2011 08:38:11 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 9 May 2012 00:14:24 GMT