- From: Ian Hickson <ian@hixie.ch>
- Date: Tue, 28 Jun 2011 23:06:51 +0000 (UTC)
- To: Jonas Sicking <jonas@sicking.cc>
- cc: Cameron McCormack <cam@mcc.id.au>, public-script-coord@w3.org
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