Renaming the jQuery Events Expando
Hi Everyone -
This is a big question that we need to answer, see ticket:
http://dev.jquery.com/ticket/1523
There's two issues at play:
1) jQuery cannot coincide with other copies of jQuery, since the same
expando is used.
2) jQuery has problems with Mootools, since they (apparently) are
using $events as their expando name as well.
I'm considering the following solution, right now: Remove all expandos
from elements, except for one, which corresponds to a unique ID for
the element. This would have a few benefits:
1) We could rename this ID at will (it's name should be randomly
generated to avoid conflicts).
2) There would only be one expando to rename/remove/tinker with.
3) The expando would be an int, which would result in no memory leaks.
Now, with this uuid inplace we could then store all relevant pieces of
information in data structures (like event handlers) and just access
them directly.
What are everyone's thoughts on this - which plugins rely on expandos
that we apply, so that we can plan for this?
--John