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

Re: [WebIDL] LC Comment - partial dictionary

From: Cameron McCormack <cam@mcc.id.au>
Date: Sun, 12 Feb 2012 15:10:10 +1100
Message-ID: <4F373BA2.7040107@mcc.id.au>
To: Travis Leithead <travis.leithead@microsoft.com>
CC: "public-script-coord@w3.org" <public-script-coord@w3.org>
Travis Leithead:
> It came up in a discussion this morning with the getUserMedia folks
> that a dictionary they were defining for getUserMedia options should
> be easily extensible. This got me wondering if the "extension"
> mechanism for interfaces would work for dictionaries too? E.g., did
> WebIDL support a "partial dictionary" which would allow another spec
> in the future to add-on to an existing defined dictionary.
>
> If my understanding of the grammar is correct, the answer is
> currently "no":
>
> [6] PartialInterface → "partial" "interface" identifier "{"
> InterfaceMembers "}" ";"
>
> It's seems like dictionaries (and additionally, though probably
> less-relevant, exceptions) should be allowed to be defined as
> "partial". That would enable the ease-of-extensibility that we
> currently enjoy with interfaces to extend to dictionaries as well.

It does seem like it would be reasonable to support "partial 
dictionaries", but dictionary members are ordered (so that any JS 
getters are run in a defined order) and having partial dictionaries 
separated out over multiple IDL fragments makes it unclear what the 
order would be.
Received on Sunday, 12 February 2012 04:10:48 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 8 May 2013 19:30:05 UTC