> We often have groups of methods that need to access common data that
> doesn't logically associate to just one DOM element.
Is there a way to designate an element that naturally holds the data,
then use .data() to access it? For example, if all the clients were
form elements, you could associate the data with the form. You could
pass a common object as the data parameter to .bind(), but it seems
like that might create a closure too.
> Modifying the event object that's passed into the listener
Seems like that could be implemented by just extending the event
object in jQuery.event.fix with some base object. The main concern I'd
have is that it's done at every event delivery, but if it was a small
object it would be relatively cheap.
event = jQuery.extend({ originalEvent: originalEvent },
jQuery.baseEventObject);
> I would like the behavior to completely halt the loop, and for
> events to be able to pass data between the listeners (which I think is
> already possible if you pass around an object).
The order that the event is delivered to all the listeners isn't well
defined, is it? You wouldn't know which listeners had already gotten
the event, so data sharing wouldn't seem very useful for listeners to
communicate with each other.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---