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

Re: EventTarget.on

From: Jake Verbaten <raynos2@gmail.com>
Date: Wed, 23 Nov 2011 17:21:24 +0000
Message-ID: <CAMCMjp3qgs1Ti=0qu2Y9EtfgTLjP2vGK-TxTm1LbdsKhQZQhgQ@mail.gmail.com>
To: Anne van Kesteren <annevk@opera.com>
Cc: Glenn Maynard <glenn@zewt.org>, www-dom@w3.org
On Wed, Nov 23, 2011 at 5:12 PM, Anne van Kesteren <annevk@opera.com> wrote:

> On Wed, 23 Nov 2011 18:07:18 +0100, Jake Verbaten <raynos2@gmail.com>
> wrote:
>
>> Would it be worthwhile to have some kind of event delegation mechanism?
>>
>
> I think so. Is there no need to unregister these handlers?
>

Yes there would be a need to unregister these handlers. If we are clever
with the design then el.removeEventListener(name, handler) would work. The
only downside would be that you can't add the same handler as an event
handler and as a delegate handler to the same event target. However I can't
think of useful situations where you would want to do that.

Otherwise we would need another method.
Received on Wednesday, 23 November 2011 17:21:55 GMT

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