Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Rename function from `new_onload` to `fallback_onload`.

  • Loading branch information...
commit 1efd86b5fbca0e36ae15176e5ccb21aedd0e9a28 1 parent 7550997
@Integralist authored
Showing with 6 additions and 7 deletions.
  1. +6 −7 Assets/Scripts/DOMready.js
View
13 Assets/Scripts/DOMready.js
@@ -14,8 +14,7 @@ var DOMready = (function() {
queue = [],
exec,
loaded,
- original_onload,
- new_onload,
+ fallback_onload,
explorerTimer,
readyStateTimer,
isIE = (function() {
@@ -107,7 +106,7 @@ var DOMready = (function() {
}, 10);
}
- new_onload = function() {
+ fallback_onload = function() {
// Note: calling process() now wont cause any problem for modern browsers.
// Because the function would have already been called when the DOM was loaded.
// Meaning the queue of functions have already been executed
@@ -115,18 +114,18 @@ var DOMready = (function() {
// Clean-up
if (supportAEL) {
- doc.removeEventListener('load', new_onload, false);
+ doc.removeEventListener('load', fallback_onload, false);
} else {
- doc.detachEvent('onload', new_onload);
+ doc.detachEvent('onload', fallback_onload);
}
};
// Using DOM1 model event handlers makes the script more secure than DOM0 event handlers.
// This way we don't have to worry about an already existing window.onload being overwritten as DOM1 model allows multiple handlers per event.
if (supportAEL) {
- doc.addEventListener('load', new_onload, false);
+ doc.addEventListener('load', fallback_onload, false);
} else {
- doc.attachEvent('onload', new_onload);
+ doc.attachEvent('onload', fallback_onload);
}
// As the DOM hasn't loaded yet we'll store this function and execute it later
Please sign in to comment.
Something went wrong with that request. Please try again.