Re: Why are dictionary-typed attributes not allowed?

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