Subject=Re: Re: Better way to maintain this reference on event listener functions

Domenic Denicola d at
Mon May 9 16:13:42 UTC 2016

To give some clarity to "whose concern is it", the idea of it being an ES concern is that this is a concern for all APIs that accept a callback. addEventListener is a simple example.

I think ES has already given an answer to this question: `Function.prototype.bind`. I'm not sure what the OP was hoping to accomplish that could not already be accomplished with bind. Any possible mechanism (e.g. syntactic sugar for a (thisArg, function) pair) would essentially duplicate what bind does under the hood.

More information about the es-discuss mailing list