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

Re: Should restrictions on attribute types look at flattened member types of unions?

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Thu, 21 Jun 2012 01:24:27 -0400
Message-ID: <4FE2B00B.1070307@mit.edu>
To: Cameron McCormack <cam@mcc.id.au>
CC: public-script-coord@w3.org
On 6/20/12 10:13 PM, Cameron McCormack wrote:
> Boris Zbarsky:
>> but this seems to be valid at the moment:
>>
>> attribute (sequence<long> or DOMString) foo;
>>
>> why should we allow the latter if we don't allow the former? Seems like
>> it would be more consistent to forbid the latter...
>
> I think the latter is already forbidden. In #idl-attributes it says:
>
> The type of the attribute MUST NOT be a sequence type or nullable
> sequence type, and it MUST NOT be a union type if one of its member
> types (or one of its member types’ member types, and so on) is a
> sequence type or nullable sequence type.

Ah, indeed.  Thank you!

Should this also forbid unions containing dictionaries, presumably? 
(And similar for exception fields.)

-Boris
Received on Thursday, 21 June 2012 05:24:58 UTC

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