forked from jeresig/env-js
-
Notifications
You must be signed in to change notification settings - Fork 75
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added test for, and implemented, body-onload event firing/handling.
- Loading branch information
Showing
7 changed files
with
78 additions
and
12 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
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
$debug("Defining MouseEvent"); | ||
$debug("Defining UiEvent"); | ||
/* | ||
* uievent.js | ||
*/ | ||
|
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
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 @@ | ||
/* | ||
* This file is a component of env.js, | ||
* http://github.com/gleneivey/env-js/commits/master/README | ||
* a Pure JavaScript Browser Environment | ||
* Copyright 2009 John Resig, licensed under the MIT License | ||
* http://www.opensource.org/licenses/mit-license.php | ||
*/ | ||
|
||
|
||
module("window"); | ||
|
||
// depends on <script> block in test/index.html | ||
test("Execution of body-onload in top-level document", function() { | ||
// top-level window-onload works, or test framework wouldn't run..... | ||
expect(1); | ||
|
||
var mtch = document.getElementById('pCreatedByBodyOnload').innerHTML. | ||
match(/dynamically-generated paragraph/); | ||
try{ ok(mtch && mtch.length > 0, | ||
"Got confirmation that body-onload handler executed"); | ||
}catch(e){print(e);} | ||
}); |