Re: [WebIDL] LC Comment - partial dictionary

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