W3C home > Mailing lists > Public > public-script-coord@w3.org > April to June 2013

Re: [webidl] Add a [Maplike] tag?

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Thu, 27 Jun 2013 11:24:55 -0700
Message-ID: <CAAWBYDA9Tgdhj3e49Q_WUODhhDJX9E4Hn89HEVYw22QO985DfQ@mail.gmail.com>
To: Cameron McCormack <cam@mcc.id.au>
Cc: "public-script-coord@w3.org" <public-script-coord@w3.org>
On Thu, Jun 27, 2013 at 2:27 AM, Cameron McCormack <cam@mcc.id.au> wrote:
> Tab Atkins Jr. wrote:
>> I've gone ahead and started using some pretend syntax for this in
>> <http://dev.w3.org/csswg/css-variables/#the-CSSVariablesMap-interface>:
>
> I've added most of this now:
>
>   http://dev.w3.org/2006/webapi/WebIDL/#MapClass
>   http://dev.w3.org/2006/webapi/WebIDL/#es-map-members

One thing that seems to be lacking is a way to set a [MapClass]
attribute with an existing Map.  Right now I'd have to do:

el.style.var.clear();
m.forEach(function(v,k) { el.style.var.set(k,v); });

I'd prefer it to be a little simpler, like:

el.style.var = m;

Is this something we can provide automatically, or does it need to be
done in prose each time?

~TJ
Received on Thursday, 27 June 2013 18:25:42 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:37:49 UTC