Skip to content

Commit fccc5c3

Browse files
Merge pull request prototypejs#69 from victor-homyakov/patch-22
Clear element creation cache in IE on page unload.
2 parents 5d29640 + 37e6c11 commit fccc5c3

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/prototype/dom/dom.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3468,5 +3468,14 @@
34683468
}
34693469

34703470
Element.addMethods(methods);
3471-
3471+
3472+
// Prevent IE leaks on DIV and ELEMENT_CACHE
3473+
function destroyCache_IE() {
3474+
DIV = null;
3475+
ELEMENT_CACHE = null;
3476+
}
3477+
3478+
if (window.attachEvent)
3479+
window.attachEvent('onunload', destroyCache_IE);
3480+
34723481
})(this);

0 commit comments

Comments
 (0)