forked from headjs/headjs
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow multiple names for one script. This accommodates the concatenat…
…ion of scripts that provide different dependencies without changing the names referenced by the dependent functions.
- Loading branch information
Showing
3 changed files
with
32 additions
and
6 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,3 @@ | ||
a=1; | ||
b=2; | ||
console.log("loaded ab.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<!doctype html> | ||
<head> | ||
<script src="../src/head.loader.js"></script> | ||
<script> | ||
head.ready("a", function(){console.log("a ready "+a);}); | ||
head.ready("b", function(){console.log("b ready "+b);}); | ||
head.js(["a", "b", "ab.js"]); | ||
</script> | ||
</head> | ||
<body> | ||
</body> |