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

Re: Why are dictionary-typed attributes not allowed?

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Thu, 07 Jun 2012 10:50:55 -0400
Message-ID: <4FD0BFCF.5060003@mit.edu>
To: Cameron McCormack <cam@mcc.id.au>
CC: public-script-coord@w3.org
On 6/7/12 1:38 AM, Cameron McCormack wrote:
> Because dictionaries are meant to be "pass by value" types, like
> sequences. Because you would be returning a plain JS object – and a new
> one each time at that – it wouldn't be suitable for use as an attribute
> type.

I see.  It's perhaps worth having an informative note in the spec to 
this effect....

> just as if you were allowed to have:
>
> interface A {
> sequence<long> xs;

Huh.  I hadn't realized sequences were not valid for attributes.  Looks 
like that's enforced on the syntax level, unlike dictionaries.  OK.

-Boris
Received on Thursday, 7 June 2012 14:51:26 UTC

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