Re: Extended attributes on WebIDL typedefs need to be defined better, or just dropped

Boris Zbarsky wrote:
> All the WebIDL spec says right now about these is:
>
> Extended attributes can be given directly after the typedef keyword,
> and any such extended attributes will be taken to apply to constructs
> that use the typedef.
>
> What does "constructs that use the typedef" mean?
>
> If I have:
>
> typedef [Foo] Bar Baz;
> readonly attribute Baz something;
>
> Is the [Foo] applied to the "something" or to the attribute? Consider
> that, for example, [TreatNullAs] is an annotation on an attribute, and
> applies to the attribute, not an annotation on the type.

Good question, and IIRC it was so that you could have a shorthand for 
putting an extended attribute on a bunch of IDL attributes without 
having to duplicate it.

> Honestly, I'm not sure I see what the use cases are for extended
> attributes here. I propose that we just drop them.

Yeah I think it was used at one point but no longer seems to be.  I'll 
just remove it.

http://dev.w3.org/cvsweb/2006/webapi/WebIDL/v1.xml.diff?r1=1.75;r2=1.76;f=h
http://dev.w3.org/cvsweb/2006/webapi/WebIDL/Overview.xml.diff?r1=1.625;r2=1.626;f=h

I think for Glenn's use of an extended attribute for documenting a 
typedef, it can go on the typedef itself, rather than after the 
"typedef" keyword.

Received on Tuesday, 18 June 2013 01:18:32 UTC