Pulling .live() functionality out of jQuery
- by Daniel
I am writing a Firefox Add-On that currently is depending on jQuery for the following things:
Selectors
Animations
A special .live("focus") hail-mary event-catching maneuver that happens to work with jQuery 1.4.2 (but not 1.4.4)
jQuery isn't well suited for functioning inside XUL, and it's a miracle we've gotten this far with it. We're trying to remove the jQuery requirements, the first two are easy (animations are simple, and we can use .querySelector() instead of jQuery), but the .live has proven impossible to do on our own. I've tried reading the source code, but I haven't been able to piece it apart.
What is the jQuery .live function doing? There's clearly a lot more going on than document.addEventListener("focus"/"focusin",function_to_pick_apart_events). What else is going on here?