- From: Travis Leithead <travis.leithead@microsoft.com>
- Date: Tue, 26 Feb 2013 17:02:59 +0000
- To: "Mandyam, Giridhar" <mandyam@quicinc.com>, Johannes Odland <johannes.odland@gmail.com>
- CC: "public-media-capture@w3.org" <public-media-capture@w3.org>
> From: Mandyam, Giridhar [mailto:mandyam@quicinc.com] > [...] > > >3. PhotoSettings: I'm really new to WebIDL, but shouldn't PhotoSettings > be a dictionary or a callback interface? > > I'm having trouble finding a prohibition in the WebIDL spec against > defining an object like PhotoSettings the way I did it, but I admit that > at the very least I should've made PhotoSettings a [NoInterfaceObject]. > Regardless, pretty much all the recent W3C specs that are defining an > options object to be passed in a method are defining them as dictionaries > so I think you are correct from that perspective (not to mention that web > runtime engines that are migrating their IDL to WebIDL also leverage > dictionaries for settings). I think a dictionary is fine. However, please note the restriction on dictionary use [1]: "Dictionaries MUST NOT be used as the type of an attribute, constant or exception field." So, you'd need to change your photoSettings to a method :-) [1] http://www.w3.org/TR/WebIDL/#idl-dictionaries -Travis
Received on Tuesday, 26 February 2013 17:04:15 UTC