Skip to content

Commit

Permalink
Fix IE attachEvent typo's.
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark McDonnell committed Apr 26, 2011
1 parent 3c57ed2 commit 1848b4d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Assets/Scripts/DOMready.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,16 +120,16 @@ var DOMready = (function() {
if (supportAEL) {
doc.removeEventListener('load', new_onload, false);
} else {
doc.detachEvent('load', new_onload);
doc.detachEvent('onload', new_onload);
}
};

// According to @jdalton: using DOM1 model event handlers makes the script more secure.
// Using DOM1 model event handlers makes the script more secure.
// Otherwise DOM0 event handlers could be overwritten by 3rd-party script.
if (supportAEL) {
doc.addEventListener('load', new_onload, false);
} else {
doc.attachEvent('load', new_onload);
doc.attachEvent('onload', new_onload);
}

// As the DOM hasn't loaded yet we'll store this function and execute it later
Expand Down

0 comments on commit 1848b4d

Please sign in to comment.