git.asbjorn.biz
/
jquery.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
6490249
)
No need to use jQuery's event system for binding the onunload event in IE.
author
jeresig
<jeresig@gmail.com>
Wed, 16 Dec 2009 20:42:03 +0000
(15:42 -0500)
committer
jeresig
<jeresig@gmail.com>
Wed, 16 Dec 2009 20:42:03 +0000
(15:42 -0500)
src/event.js
patch
|
blob
|
history
diff --git
a/src/event.js
b/src/event.js
index
018d4d9
..
283d1e0
100644
(file)
--- a/
src/event.js
+++ b/
src/event.js
@@
-876,10
+876,9
@@
jQuery.each( ("blur focus load resize scroll unload click dblclick " +
// More info:
// - http://isaacschlueter.com/2006/10/msie-memory-leaks/
/*@cc_on
// More info:
// - http://isaacschlueter.com/2006/10/msie-memory-leaks/
/*@cc_on
-jQuery( window ).bind( 'unload', function() {
+window.attachEvent("onunload", function() {
for ( var id in jQuery.cache ) {
for ( var id in jQuery.cache ) {
- // Skip the window
- if ( id != 1 && jQuery.cache[ id ].handle ) {
+ if ( jQuery.cache[ id ].handle ) {
// Try/Catch is to handle iframes being unloaded, see #4280
try {
jQuery.event.remove( jQuery.cache[ id ].handle.elem );
// Try/Catch is to handle iframes being unloaded, see #4280
try {
jQuery.event.remove( jQuery.cache[ id ].handle.elem );