Ok, took me more than an hour but I finally updated the patch to fit
all the new changes in the trunk (live,event bubbling,etc).
I added a 'currentTarget' attribute to the event object which reflects
the actual element while bubbling, while 'target' keeps the original.
I added the possibility to pass a literal object as THE event object
({type:'click',foo:'bar'}). It gets copied to a real one afterwards.
I think this is enough to satisfy John's request. One isn't FORCED to
use the 'new' keyword. But it is possible.
While it is nice to use jQuery without 'new'. One cannot extend it if
desired.
jQuery.Event can be surely extended, so I think hiding its OO source
would just confuse someone trying to extend it.
We could have a plugin that adds MouseEvent and KeyboardEvent, as an
easy way to simulate those.
In addition, event objects have a 'stopImmediatePropagation' method to
kill the following handlers. This was added some time ago.
http://dev.jquery.com/changeset/6005Cheers
--
Ariel Flesler
http://flesler.blogspot.com