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 13:53:12 +0100
Message-ID: <50F00B38.20407@opera.com>
To: www-dom@w3.org
On 01/10/2013 08:06 PM, Jake Verbaten wrote:
> Putting properties on a function is valid. There's plenty of room for
> future enhancements.

It's valid but ugly as hell.

I don't see why we want to artificially paint ourselves into a corner here.

var evt = elem.on("click", function() {}, "button");

so much worse than

var detach = elem.on("click", function() {}, "button");

That we are prepared to risk future headaches because we didn't allow 
for the possibility of future additions to this part of the platform?
Received on Friday, 11 January 2013 12:53:42 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 20 October 2015 10:46:20 UTC