[jQuery] unload garbage collection 1.3.2 patch

2009-04-08 Thread docyes

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 );


[jQuery] Re: unload garbage collection 1.3.2 patch

2009-04-08 Thread docyes

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 );


[jQuery] Re: bug: jquery and writing an flv player flash object on windows (vista)

2008-09-29 Thread docyes

Hi Robert,

Adding Flash to a document is surprisingly hard. I'm glad Flash TML
worked for you.

Let me know if you or the community would like a port of the library
for JQuery?

On a secondary note, if you need something for detection checkout:
http://www.featureblend.com/javascript-flash-detection-library.html

Cheers,
Carl

On Sep 24, 10:23 am, Robert Koberg [EMAIL PROTECTED] wrote:
 FWIW,

 After trying jquery html() and similar methods, myDiv.innerHTML,  
 document.write, and every library available for writing out a flash  
 object that can coexist with jquery (and thickbox) and work on  
 windows, here is the only one that worked:

 http://www.featureblend.com/javascript-flash-html-generator-library.html

 -Rob

 On Sep 24, 2008, at 10:56 AM, Robert Koberg wrote:



  Hi,

  Clicking  a link and writing an FLV Flash player object:

  pa href=# onclick=changeFLV()Test/a/p

  div id=playerContainer /div

  script type=text/javascript
  function changeFLV() {
  //$(#playerContainer).html(
   document.getElementById(playerContainer).innerHTML = object  
  data='FLVPlayer_Progressive.swf' height='1' type='application/x-
  shockwave-flash' width='1'param name='movie'  
  value='FLVPlayer_Progressive.swf' id='FLVPlayer' valuetype='data'/
  param id='flashvars-data' valuetype='data'  
  value
  ='MM_ComponentVersion=1skinName=ClearExternalAllstreamName=media/
  sound/roker/Page8_1-2.flvautoPlay=trueautoRewind=false'  
  name='FlashVars'/pYou need a newer version Flash Player to view  
  videos./p/object;
  }
  /script

  works fine without jquery on the page. With jquery on the page it  
  does not work. It still does not work if you use jquery methods to  
  set the HTML on the page.

  Is there some way to make this work? Or is it a bug?

  To test, you can grab:
 http://pearsonf.ipower.com/celeb-readings/FLVPlayer_Progressive.swf
 http://pearsonf.ipower.com/celeb-readings/media/sound/roker/Page8_1-2...

  thanks,
  -Rob


[jQuery] addEventListener onerror workaround with jQuery.fn.bind

2008-09-04 Thread docyes

In Firefox if an error is thrown in an event handler attached using
addEventListener it will not make it to the window.onerror handler,
see: https://bugzilla.mozilla.org/show_bug.cgi?id=312448

The solution to this problem is to override jQuery.fn.bind with a
handler in a try/catch block.

Has anyone done this with strong familiarity with the jQuery.fn.bind?

Thanks,
Carl