Skip to content

Commit

Permalink
Incorporating changes by kguelzau
Browse files Browse the repository at this point in the history
Comment thread: mootools#2329
Pull request: mootools#2476
  • Loading branch information
okolvik committed Mar 28, 2013
1 parent 96b4253 commit f4b1c51
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 9 deletions.
6 changes: 4 additions & 2 deletions Source/Browser/Browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,10 @@ if (document.execCommand) try {
/*<ltIE9>*/
if (this.attachEvent && !this.addEventListener){
var unloadEvent = function(){
this.detachEvent('onunload', unloadEvent);
document.head = document.html = document.window = this.Window = this.Document = null;
this.detachEvent('onunload', unloadEvent);
document.head = document.html = document.window;

This comment has been minimized.

Copy link
@kguelzau

kguelzau May 22, 2013

Should be
document.head = document.html = document.window = null;

This comment has been minimized.

Copy link
@okolvik

okolvik May 25, 2013

Author Owner

Of course, can't believe I missed that.

// cleanup scope vars
window = this.Window = document = null;
};
this.attachEvent('onunload', unloadEvent);
}
Expand Down
16 changes: 9 additions & 7 deletions Source/Utilities/DOMReady.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,15 @@ var ready,
testElement = document.createElement('div');

var domready = function(){
clearTimeout(timer);
if (ready) return;
Browser.loaded = ready = true;
document.removeListener('DOMContentLoaded', domready).removeListener('readystatechange', check);
testElement = null;
document.fireEvent('domready');
window.fireEvent('domready');
clearTimeout(timer);
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(){
Expand Down

0 comments on commit f4b1c51

Please sign in to comment.