News for hackers. Stuff that matters.
Re:Finally someone makes sense of JavaScript's this keyword by jrockway on Saturday April 23, 2011 @11:45PM (#2478221)
Aha! I also do "var self = this;" but feel really bad about it, like I'm missing something obvious about the language. I guess I'm not.
Re:Finally someone makes sense of JavaScript's this keyword by msy on Sunday April 24, 2011 @05:00AM (#2478542)
You're not alone, every time I do this I feel like I'm going wrong somewhere. I know it's avoidable via binding/currying/proxying but often those solutions end up looking uglier and are harder to follow.