3 ms·
I know what you mean. When I have lots of event-handlers in a prototype I like to assign var self = this; but that's bikeshedding
by monos 17y ago
I know what you mean. When I have lots of event-handlers in a prototype I like to assign
var self = this;
but that's bikeshedding
- aarongough 17y agoWhat do you mean by 'bikeshedding'?
- monos 17y agohttp://catb.org/jargon/html/B/bikeshedding.html http://catb.org/jargon/html/B/bikeshedding.html wether we should call it thisObj or self :)
- aarongough 17y agoAh gotcha. I checked the definition at a few places but the context still seemed unclear. I agree, one way or the other is fine. Do you use 'self' because you're a Ruby coder? That actually the reason I would stay away from it! But then again I'm easily confused :-p