Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
J
jquery
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
夏彬
jquery
Commits
42f8c3ad
Commit
42f8c3ad
authored
Dec 19, 2009
by
jeresig
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
No need to use the conditional comment for binding the onunload event in IE.
parent
0d06f399
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
11 deletions
+11
-11
event.js
src/event.js
+11
-11
No files found.
src/event.js
View file @
42f8c3ad
...
@@ -882,15 +882,15 @@ jQuery.each( ("blur focus load resize scroll unload click dblclick " +
...
@@ -882,15 +882,15 @@ 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/
/*@cc_on
if ( window.attachEvent ) {
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 ) {
// Try/Catch is to handle iframes being unloaded, see #4280
// Try/Catch is to handle iframes being unloaded, see #4280
try {
try {
jQuery.event.remove( jQuery.cache[ id ].handle.elem );
jQuery.event.remove( jQuery.cache[ id ].handle.elem );
} catch(e) {}
} catch(e) {}
}
}
}
}
});
});
}
@*/
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment