-
Notifications
You must be signed in to change notification settings - Fork 512
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e1a153c
commit 9adadae
Showing
5 changed files
with
151 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" /> | ||
<title>Add MooTools when page is already ready</title> | ||
</head> | ||
<body> | ||
|
||
<script> | ||
function callback(){ | ||
window.callbackFired = true; | ||
} | ||
|
||
function addScript(path){ | ||
var script = document.createElement('script'); | ||
script.type = 'text/javascript'; | ||
script.src = path; | ||
document.getElementsByTagName('head')[0].appendChild(script); | ||
} | ||
|
||
window.callbackFired = false; | ||
window.onload = function(){ | ||
addScript('/base/mootools-all.js'); | ||
addScript('/base/mootools-nocompat.js'); | ||
} | ||
</script> | ||
</body> | ||
</html> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" /> | ||
<title>Normal DOMReady scenario</title> | ||
|
||
<script src="/base/mootools-all.js" type="text/javascript"></script> | ||
<script src="/base/mootools-nocompat.js" type="text/javascript"></script> | ||
</head> | ||
<body> | ||
|
||
<script> | ||
function callback(){ | ||
window.callbackFired = true; | ||
} | ||
|
||
window.callbackFired = false; | ||
window.addEvent('domready', callback); | ||
</script> | ||
</body> | ||
</html> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" /> | ||
<title>DOMReady added when page is already loaded</title> | ||
|
||
<script src="/base/mootools-all.js" type="text/javascript"></script> | ||
<script src="/base/mootools-nocompat.js" type="text/javascript"></script> | ||
</head> | ||
<body> | ||
|
||
<script> | ||
function callback(){ | ||
window.callbackFired = true; | ||
} | ||
|
||
window.callbackFired = false; | ||
</script> | ||
</body> | ||
</html> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters