W3C home > Mailing lists > Public > public-script-coord@w3.org > July to September 2011


From: Andreas Gal <gal@mozilla.com>
Date: Mon, 29 Aug 2011 13:26:11 -0700
Message-Id: <5DAF279D-5204-4BE1-85F7-A11D216973B7@mozilla.com>
To: public-script-coord@w3.org

The current draft of the W3C Contacts API annotates every interface with [NoInterfaceObject].


I tried to discuss this with the working group, but they feel that its important to not pollute the global name space.

I think this is wrong and breaks established DOM bindings patterns, so I would propose some language to be added to WebIDL to narrowly define in what cases [NoInterfaceObject] should be used.

In some of the use cases in the W3C Contacts API dictionaries can be used (the working group is already receptive to this idea).

For general APIs we should disallow [NoInterfaceObject]. The Contacts API for example defines this:

interface ContactError {
 const unsigned short UNKNOWN_ERROR = 0;
This seems really counter-intuitive. Developers will want to use this by name (ContactError.UNKNOWN_ERROR). Instead of arguing with each working group about their particular view of what good DOM bindings look like, we should add some guidance in WebIDL.
TC39 is already tackling global name space pollution using modules.
If there is no actual forward-looking use left for [NoInterfaceObject] maybe we can remove it altogether.
Received on Monday, 29 August 2011 20:26:36 UTC

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