Alternative to $.event.handle in 1.9.0

Alternative to $.event.handle in 1.9.0

Hi,


I have written a library of mobile 'events', that unifies mobile and desktop clicks and touches into a single event (see here > https://github.com/benmajor/jQuery-Mobile-Events). 


I (rather foolishly) relied on two undocumented jQuery features to handle certain areas within the code. One of them was $.attrFn, which I have been able to fix by declaring it myself, but the other is a little more difficult, it is the $.event.handler.

The full code that no longer works is as follows:

  1. function triggerCustomEvent( obj, eventType, event ) {
  2. var originalType = event.type;
  3. event.type = eventType;
  4. $.event.handle.call( obj, event );
  5. event.type = originalType;
  6. }
How would I go about altering the code so that it continues to function as expected with jQuery 1.9.0+?

Thanks,
Ben.