W3C home > Mailing lists > Public > www-dom@w3.org > October to December 2011

Re: EventTarget.on

From: Anne van Kesteren <annevk@opera.com>
Date: Wed, 23 Nov 2011 12:40:27 +0100
To: www-dom@w3.org, "Jake Verbaten" <raynos2@gmail.com>
Message-ID: <op.v5eddp2h64w2qv@annevk-macbookpro.local>
On Mon, 21 Nov 2011 16:13:02 +0100, Jake Verbaten <raynos2@gmail.com>  
> 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  

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

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:36:59 UTC