Re: [webidl] [Implements] extended attribute

On Mon, 9 Feb 2009, Anne van Kesteren wrote:
> To complement [ImplementedOn] I think we need [Implements]. For 
> instance, objects implementing the XMLHttpRequest interface must 
> implement the EventTarget interface can be neatly described in the IDL:
>   [Constructor,
>    Implements=EventTarget]
>   interface XMLHttpRequest ...
> It would be nice if it could be used multiple times as well, e.g.
>   [Implements=EventTarget,
>    Implements=XMLHttpRequestEventTarget]
>   interface XMLHttpRequestUpload ...
> I am assuming something like this ends up in the Web IDL specification 
> for now as per IRC discussion.

Heycam and I discussed this on IRC a few weeks ago.

The problem with Implements= and ImplementedOn= is that which you would 
use would depend on which spec came first, which is a pretty silly way for 
us to write the IDL. I would instead recommend a way to annotate such 
relationships that is independent of interface {} blocks. For example:

   interface XMLHttpRequest { ... };

   interface EventTarget { ... };

   XMLHttpRequest implements EventTarget;

This would also allow us to spec the relationships completely 
independently of the interfaces, e.g. the spec that defines Navigator and 
the spec that implements EventTarget need not be the same as the spec that 
fires 'online' events at Navigator (and thus requires Navigator to be an 

Is there a list of outstanding WebIDL requests anywhere?

(Incidentally, since XMLHttpRequestEventTarget inherits from EventTarget, 
XMLHttpRequestUpload should implement the former only.)

Ian Hickson               U+1047E                )\._.,--....,'``.    fL       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'

Received on Monday, 9 February 2009 19:44:37 UTC