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

Re: How to get event listener method inheritance clarified

From: Olli Pettay <Olli.Pettay@helsinki.fi>
Date: Mon, 21 Sep 2009 11:29:37 +0300
Message-ID: <4AB73971.2050803@helsinki.fi>
To: cam@mcc.id.au, www-dom@w3.org
On 9/18/09 10:31 AM, Cameron McCormack wrote:
> Hi Christopher.
> Christopher M. Balz:
>> Imho, the DOM spec should clearly state where the 'addEventListener'
>> and 'removeEventListener' methods should be located in the 'Element'
>> inheritance hierarchy.
>> …
>> Could this be included in a spec update?
> Web IDL specifies this, but not currently in a way that describes what
> implementations do at the moment:
>    http://dev.w3.org/2006/webapi/WebIDL/#interface-prototype-object
> We’ll see how well the browser vendors take to it once we go to Last
> Call.
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.

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.

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

Received on Monday, 21 September 2009 08:32:22 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 20 October 2015 10:46:15 UTC