- From: Tab Atkins Jr. <jackalmage@gmail.com>
- Date: Mon, 14 Jul 2014 18:42:47 -0700
- To: Cameron McCormack <cam@mcc.id.au>
- Cc: Domenic Denicola <domenic@domenicdenicola.com>, Brian Birtles <bbirtles@mozilla.com>, "public-fx@w3.org" <public-fx@w3.org>, Boris Zbarsky <bzbarsky@mit.edu>
On Mon, Jul 14, 2014 at 5:25 PM, Cameron McCormack <cam@mcc.id.au> wrote: > On 15/07/14 10:12, Tab Atkins Jr. wrote: >> I'm currently using a dictionary for an attribute in the CSS Color >> spec, too: <http://dev.w3.org/csswg/css-color/#api-RGBColor> >> >> We should figure out what to do about this. > > > The current leading plan is to enable dictionary-typed attributes using > something like Gecko's [Cached] extended attribute, which indicates that the > same value keeps getting returned until something explicitly invalidates it, > after which getting the attributes will return a newly constructed > dictionary value. Not sure about the IDL syntax yet (or really whether it > should be a separate concept from "dictionaries", since dictionaries are > currently (abstractly) pass-by-value structures but what we want here is a > reference to an object with a particular structure). If it helps, all I want here is a way to easily cluster attributes together. My case would work just as well if all the stringifiers were just attributes on the interface, but for convenience and idiom-matching, they're in a sub-object. I could also just give it a type of "object" and describe its value in prose, but I like using a dictionary because expressing it in IDL is easier and clearer than in prose, and it gives me type-checking for free. Other people probably have more complicated needs. ~TJ
Received on Tuesday, 15 July 2014 01:43:38 UTC