That's great!
On May 7, 8:12 pm, Brandon Aaron <[email protected]> wrote:
> Yes, that was left-over code from looking at implementing this feature in a
> different way (removed now, thanks). We are definitely looking into what it
> would take to bring this functionality to other methods within the library
> that use callbacks but wanted to go ahead and get this applied for events
> due to its popularity.
> --
> Brandon Aaron
>
> On Thu, May 7, 2009 at 12:53 PM, Balazs Endresz
> <[email protected]>wrote:
>
>
>
>
>
> > I've just had a look at r6344 and there seems to be an extra argument
> > in jQuery.event.add but that function hasn't been modified (yet?).
> > And maybe it's been mentioned before but if you're really adding this
> > feature why not do the same with $.each? Hopefully no one uses the
> > internal `args` argument and it would be at least as useful as for
> > events.
>
> > On May 5, 3:44 pm, Brandon Aaron <[email protected]> wrote:
> > > How about "thisObject"? Taken from Mozilla's docs for the forEach method
> > (https://developer.mozilla.org/En/Core_JavaScript_1.5_Reference:Object...
> > ).
> > > --
> > > Brandon Aaron
>
> > > On Mon, May 4, 2009 at 11:38 PM, Michael Geary <[email protected]> wrote:
>
> > > > 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
-~----------~----~----~----~------~----~------~--~---