Re: Better event listeners

On Thu, Jan 10, 2013 at 4:47 AM, Anne van Kesteren <> wrote:
> On Thu, Jan 10, 2013 at 3:35 AM, Jonas Sicking <> wrote:
>> foo.addEventListener("click", object.clickhandler.bind(object));
>> which is pretty verbose.
> We discussed this in depth before when discussing the approach for
> callbacks. We decided bind() was exactly the kind of feature that can
> be used for this and maybe future editions of JavaScript should make
> it easier to use, but that we would not try to work around it.

Fair enough.

/ Jonas

Received on Friday, 18 January 2013 03:38:33 UTC