docyes, Either submit a bug and add the patch to it or post this to the jquery-dev group.
Thanks, Ralph On Wed, Apr 8, 2009 at 3:35 PM, docyes <doc...@gmail.com> wrote: > > Typo: > >Garbage cleanup is not assigned to an anonymous function. > <Garbage cleanup is assigned to an anonymous function. > > On Apr 8, 12:28 pm, docyes <doc...@gmail.com> wrote: > > ISSUE: > > Garbage cleanup is not assigned to an anonymous function. Sometimes > > unonload is used by other logic that may need jQuery to perform > > certain tasks. The ability to unbind/bind the garbage collection > > routine is handy to bump execution order. > > > > SUGGESTED SOLUTION: > > Assign garbage collection routine to a named closure. > > > > PATCH FILE: > > 3106,3111c3106,3111 > > < jQuery( window ).bind( 'unload', function(){ > > < for ( var id in jQuery.cache ) > > < // Skip the window > > < if ( id != 1 && jQuery.cache[ id ].handle ) > > < jQuery.event.remove( jQuery.cache[ id ].handle.elem > ); > > < }); > > --- > > > > > jQuery.fn.oscarTheGrouch = function(){ > > > for ( var id in jQuery.cache ) > > > // Skip the window > > > if ( id != 1 && jQuery.cache[ id ].handle ) > > > jQuery.event.remove( jQuery.cache[ id ].handle.elem ); > > > }; jQuery( window ).bind( 'unload', jQuery.fn.oscarTheGrouch ); >