Re: whether [Callback=FunctionOnly] should be the default

On Tue, 28 Jun 2011, Jonas Sicking wrote:
>
> On the other hand, you can always bridge the gap between a object with 
> handleEvent and a function by changing
> 
> addEventListener("foo", someObject, false);
> to
> addEventListener("foo", someObject.handleEvent.bind(someObject), false);

That's certainly a lot less scary than messing with the prototype chain!

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'

Received on Tuesday, 28 June 2011 23:07:13 UTC