W3C home > Mailing lists > Public > www-dom@w3.org > July to September 2009

Re: How to get event listener method inheritance clarified

From: Cameron McCormack <cam@mcc.id.au>
Date: Mon, 21 Sep 2009 21:54:02 +1000
To: "Olli@pettay.fi" <Olli@pettay.fi>
Message-Id: <7AF6D8DA-C3FB-4B27-8830-83FF59179A18@mcc.id.au>
Cc: "www-dom@w3.org" <www-dom@w3.org>
Hi Olli.

Olli Pettay:
> So how does webidl handle cases like window and XHR?
>>
> I mean, what if a script library wants to replace .addEventListener on
> all the objects which implement EventTarget.

With what's currently in the spec, you'd have to replace the  
addEventListener property in many places.

> Based on the http://dev.w3.org/2006/webapi/WebIDL/#PrototypeRoot  
> example
> there would be a separate mixin object for each node type and XHR  
> and window etc. I don't think we want that, at least not for  
> EventTarget.

Yeah, it's definitely suboptimal at the moment.

> I wonder if we could define that EventTarget is the [PrototypeRoot].

You couldn't have both Node and  EventTarget be the prototype root in  
the current model. But maybe there could be way of specifying that  
the  EventTarget prototype goes above Node's, somehow.
Received on Monday, 21 September 2009 11:54:50 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 22 June 2012 06:14:03 GMT