W3C home > Mailing lists > Public > www-dom@w3.org > January to March 2013

Re: Better event listeners

From: James Graham <jgraham@opera.com>
Date: Fri, 11 Jan 2013 17:40:40 +0100
Message-ID: <50F04088.60106@opera.com>
To: www-dom@w3.org
On 01/11/2013 02:33 PM, Anne van Kesteren wrote:
> Furthermore, returning an object means keeping
> a larger object in memory,

I don't think that this mind of micro-optimisation is a valid argument 
here. Creating an event handler isn't something that you have to do 
thousands of times in a tight loop. Indeed with the delegation pattern 
that we are trying to support here you dramatically cut down the number 
of listeners that are required compared to the one-listener-per-target 
approach.
Received on Friday, 11 January 2013 16:41:09 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 11 January 2013 16:41:11 GMT