2 ms·
I use classes in Coffeescript, but avoid 'this' bugs by knowing that: - JQuery examples like to abuse 'this'. - I should always, explictly provide the event a
by nailer 15y ago
I use classes in Coffeescript, but avoid 'this' bugs by knowing that:
- JQuery examples like to abuse 'this'.
- I should always, explictly provide the event as a parameter in the callback.
So '@' is always the object, and 'event' is whatever started the method.