I don't find this feature all that useful myself, since my callback
functions tend to be a mix of jQuery/DOM, setTimeout, Google Maps/Earth, and
other asynchronous APIs. If I can only bind an object to a callback in one
of those types of APIs and not the others - or if they each sprout
independent ways of doing it - I may as well just use a closure so I have
one way to handle them all.

But I've seen that a lot of people do like this capability, so I certainly
don't object to it, unless of course it slows down my own code.

My one request: please do not call it "scope"! Not in the code, not in the
comments, and not in the docs.

JavaScript has something called scope, and you create it by nesting
functions lexically (or using the "with" statement). Setting the "this"
value for an event or other callback isn't related in the slightest to
scope.

If you need a name for the concept, you could describe it as "binding an
object to the event handler" or - probably better - "calling the event
handler as a method of an object". I don't know of a short and sweet word
for it, but "scope" is already taken. :-)

Thanks,

-Mike


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"jQuery Development" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/jquery-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to