W3C home > Mailing lists > Public > public-script-coord@w3.org > January to March 2014

Re: partial interfaces, [NoInterfaceObject]

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Thu, 13 Feb 2014 12:02:43 -0500
Message-ID: <52FCFAB3.9090406@mit.edu>
To: public-script-coord@w3.org
On 2/13/14 11:50 AM, Michael van Ouwerkerk wrote:
> This change seems to make sense as it is less verbose, and there's no
> need for multiple interfaces to implement this. Is there any further
> guidance on pros and cons?

I think that sums it up.  You should probably use partial interface if 
you can.  The only time you need "implements" is if you have multiple 
interfaces that all want to share the same IDL snippet.

The only reason to consider "implements" here, I suspect, is if we plan 
to have .geolocation on WorkerNavigator.  And even then, two separate 
partial interfaces might be clearer.

> What are the reasons for exposing an
> object like this in the global namespace?

Mostly it allows scripts to easily get to Geolocation.prototype without 
jumping though weird hoops.

That's of somewhat limited utility in the case of singleton objects like 
this one, of course...

-Boris
Received on Thursday, 13 February 2014 17:03:16 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:37:51 UTC