W3C home > Mailing lists > Public > public-webapps@w3.org > January to March 2009

Re: [webidl] [Implements] extended attribute

From: Ian Hickson <ian@hixie.ch>
Date: Mon, 9 Feb 2009 19:43:56 +0000 (UTC)
To: Anne van Kesteren <annevk@opera.com>
Cc: WebApps WG <public-webapps@w3.org>
Message-ID: <Pine.LNX.4.62.0902091938050.952@hixie.dreamhostps.com>

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:

   [Constructor]
   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 
EventTarget).

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
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
Received on Monday, 9 February 2009 19:44:37 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 18:49:29 GMT