Make sure that we don't bind the onunload event in Opera.

This commit is contained in:
jeresig 2009-12-18 22:35:02 -05:00
parent 3fd62eae9d
commit 1feb92afb4

View file

@ -882,7 +882,7 @@ jQuery.each( ("blur focus load resize scroll unload click dblclick " +
// Window isn't included so as not to unbind existing unload events // Window isn't included so as not to unbind existing unload events
// More info: // More info:
// - http://isaacschlueter.com/2006/10/msie-memory-leaks/ // - http://isaacschlueter.com/2006/10/msie-memory-leaks/
if ( window.attachEvent ) { if ( window.attachEvent && !window.addEventListener ) {
window.attachEvent("onunload", function() { window.attachEvent("onunload", function() {
for ( var id in jQuery.cache ) { for ( var id in jQuery.cache ) {
if ( jQuery.cache[ id ].handle ) { if ( jQuery.cache[ id ].handle ) {