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

partial interfaces, [NoInterfaceObject]

From: Michael van Ouwerkerk <mvanouwerkerk@google.com>
Date: Thu, 13 Feb 2014 16:50:44 +0000
Message-ID: <CAF40kP6+29F36-HM0H8C=nsen5MYZxCsMjj-2j08OXHna__SNA@mail.gmail.com>
To: public-script-coord@w3.org
(please CC me in any responses, as I'm not subscribed to

Hi, I'm looking for some guidance on the use of partial interfaces, and
also of [NoInterfaceObject]. This came up when reviewing feedback on
snippets of WebIDL in the Geolocation API.

It was suggested that this form:

interface NavigatorGeolocation {
  readonly attribute Geolocation geolocation;
Navigator implements NavigatorGeolocation;

Should be replaced by this form:

partial interface Navigator {
  readonly attribute Geolocation geolocation;

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?

The other thing that came up was that generally [NoInterfaceObject] should
be removed unless there is a good reason to have it. For example "The
Geolocation interface should not have [NoInterfaceObject]."

This part makes less sense to me. What are the reasons for exposing an
object like this in the global namespace? It seems to have little use, but
perhaps for feature detection. Still, that can also be done by checking for
the presence of window.navigator.geolocation.


Received on Thursday, 13 February 2014 16:51:14 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:14:19 UTC