Re: EventTarget.on

On Mon, 21 Nov 2011 16:13:02 +0100, Jake Verbaten <raynos2@gmail.com>  
wrote:
> addEventListener is long and verbose. Could we have `on` as a synonym for
> addEventListener ?

I think it should have additional functionality if we are going to add  
something new. E.g. ignore whether the event was dispatched as a bubbling  
event or not and have it always go through the bubble phase. Maybe add the  
possibility of only invoking the listener when it is registered on the  
actual event target, things like that.

Native support for jQuery-style event delegation was suggested during  
TPAC. I'm not that familiar with event delegation, or how jQuery's API  
works here, but I'm not opposed to adding new features around event  
handling.


-- 
Anne van Kesteren
http://annevankesteren.nl/

Received on Wednesday, 23 November 2011 11:40:57 UTC