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

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 UTC