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

Boris Zbarsky:
> This is not valid WebIDL:
>
>    attribute sequence<long> foo;
>
> 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.

Received on Thursday, 21 June 2012 02:14:13 UTC