W3C home > Mailing lists > Public > public-device-apis@w3.org > September 2012

Re: [vibra] Adding [NoInterfaceObject] to the Vibration interface

From: Robin Berjon <robin@w3.org>
Date: Wed, 05 Sep 2012 12:30:40 +0200
Message-ID: <504729D0.50304@w3.org>
To: Jonas Sicking <jonas@sicking.cc>
CC: Anssi Kostiainen <anssi.kostiainen@nokia.com>, "public-device-apis@w3.org public-device-apis@w3.org" <public-device-apis@w3.org>, ext Justin Lebar <jlebar@mozilla.com>, 권기홍 Kwon <kihong.kwon@samsung.com>
On 05/09/2012 12:09 , Jonas Sicking wrote:
> Since this isn't a new object, but rather just additional properties
> on the window.navigator object, we should remove the interface
> completely and just do:
>
> partial interface Navigator {
>      void vibrate (unsigned long time);
>      void vibrate (unsigned long[] pattern);
> }
>
> That is effectively equivalent to having a "[NoInterfaceObject]
> Vibration" interface. The only difference that I can think of is if we
> start adding functions which takes arguments of type "Vibration", but
> I hope we have no such plans.

Given the current specification, I believe that Jonas is entirely right.

That being said, part of the reason behind the original design was that 
one should be able to do:

     GamePad implements Vibration;

or

     interface HapticDevice {
         readonly attribute Vibration[] vibrators;
     };

If we stick to that plan, I think that NoInterfaceObject is actually 
fine since it's meant to be a supplemental interface. But I guess that 
bridge might be crossed when we get there?

-- 
Robin Berjon - http://berjon.com/ - @robinberjon
Received on Thursday, 6 September 2012 07:35:42 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 6 September 2012 07:35:42 GMT