Ken, Ryan - you guys are pretty sweet. In the long run I'll be moving
to the microsoft AJAX framework (ack!) and using their event
registration model to take care of this - but until then, I'll be
using Ryan's workaround - carpet bombs instead of scalpels for now :)

Cheers,
-Tuan

On Dec 3, 11:32 am, Ken Snyder <[EMAIL PROTECTED]> wrote:
> Tuan wrote:
> > Oh man - yeah, the removal of this method really wreaks havoc on our
> > web app. We use UnloadCache() as part of our AJAX handling code - with
> > it gone, there's no way to wipe the slate clean with event handlers
> > for ajax loads. It's nice that it's called automatically on page
> > unload for IE, but what about for AJAX updates? I would looooooove for
> > this to be made public again! Until then, I guess we have to stick
> > with prototype 1.5 :(
>
> > -Tuan
>
> You can easily implement your own destroyCache function:
>
> Event.unloadCache = function() {
>   for (var id in Event.cache)
>     for (var eventName in cache[id])
>       cache[id][eventName] = null;
>
> };
>
> Also, along those lines, I wonder if using Element#remove will clear up
> any memory leaks.  If not, Element#remove should  be ramped up to detach
> listeners.  I'm thinking of Douglas Crockford's purge() function
> (http://javascript.crockford.com/memory/leak.html) but I don't
> understand the Prototype 1.6 Event code well enough--I could be way off
> base.
>
> - Ken Snyder
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Spinoffs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to