Re: How to get event listener method inheritance clarified

From: "Christopher M. Balz" <>
> Imho, the DOM spec should clearly state where the 'addEventListener' and 
> 'removeEventListener' methods should be located in the 'Element' 
> inheritance hierarchy.
> Allowing easy wrapping/extension of these methods is critical to current 
> frameworks.  An example is JavaScript frameworks that want to make these 
> methods accept an object-context argument - a 'this' context for the event 
> listener to run in.  That enables object-oriented event listening.
> Currently, Web browsers based on WebKit JavaScript glue have these methods 
> at the top of the hierarchy, with no overriding implementations in 
> subclasses such as 'HTMLDivElement'. As there are many such subclasses, 
> and even varying sets of such subclasses, that arrangement allows for fast 
> (e.g. fast Web page load) and effective (covering all subclasses of 
> 'Element') extension of these methods to meet modern software engineering 
> standards for programming-in-the-large.


> However the other browsers do not currently follow suit.  Because the DOM 
> spec defines many items that inherit from 'Element', it should specify the 
> inheritance characteristic of these methods.
> Could this be included in a spec update?
> Thank you,
>  Christopher M Balz 

Received on Friday, 18 September 2009 11:41:31 UTC