Permalink
Browse files

Merge PR-2476: Fix for IE8 iFrame leak

closes #2476, fixes #2329

* pr/2476:
  Spaces to tabs
  Add missing null.
  Incorporating changes by kguelzau
  Set testElement to null on domready
  Set this.Window and this.Document to null on unload.
  • Loading branch information...
SergioCrisostomo committed Jul 22, 2014
2 parents 20b3954 + 7a15612 commit 1d38828bbdea786390a386b8500b186cece2c8db
Showing with 9 additions and 6 deletions.
  1. +1 −0 Source/Browser/Browser.js
  2. +8 −6 Source/Utilities/DOMReady.js
@@ -191,6 +191,7 @@ if (this.attachEvent && !this.addEventListener){
var unloadEvent = function(){
this.detachEvent('onunload', unloadEvent);
document.head = document.html = document.window = null;
window = this.Window = document = null;
};
this.attachEvent('onunload', unloadEvent);
}
@@ -25,12 +25,14 @@ var ready,
var domready = function(){
clearTimeout(timer);
if (ready) return;
Browser.loaded = ready = true;
document.removeListener('DOMContentLoaded', domready).removeListener('readystatechange', check);
document.fireEvent('domready');
window.fireEvent('domready');
if (!ready) {
Browser.loaded = ready = true;
document.removeListener('DOMContentLoaded', domready).removeListener('readystatechange', check);
document.fireEvent('domready');
window.fireEvent('domready');
}
// cleanup scope vars
document = window = testElement = null;
};
var check = function(){

0 comments on commit 1d38828

Please sign in to comment.