Re: Better event listeners

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.

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

so much worse than

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

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