When we switched over to jQuery from Prototype in our Tapestry app, we
found that we were still tied to Prototype for a few reasons:

   1. We had lots of existing Prototype javascript code.
   2. We needed to fire and observe Tapestry js custom events, even in our
   new jQuery code.
   3. We have existing Prototype code that fires and observes custom js
   events.  We must continue to interact with this code from the new jQuery
   code until we have time to convert it all to jQuery.

The only real solution to #1 is to re-write the legacy js code, but, there
is a much simpler solution to #2 & #3: a bridge allowing custom events
triggered from jQuery code to hit Prototype observers, and custom events
fired by Prototype to hit jQuery bound event listeners.  Such a bridge is
relatively simple to write, and I quickly wrote one for our project.  We've
found it to be quite useful, and it is in a public github
repo<https://github.com/Widen/jquery-prototype-custom-event-bridge>,
in case anyone else might find something like this useful.

Please see the README in the project for specifics.

Reply via email to