Created
January 28, 2012 17:14
-
-
Save unscriptable/1695074 to your computer and use it in GitHub Desktop.
reproduce curl.js issue 53
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
<!DOCTYPE HTML> | |
<html> | |
<head> | |
<title>issue 53</title> | |
<script src="../src/curl.js" type="text/javascript"></script> | |
<script type="text/javascript"> | |
curl({ | |
paths: { | |
curl: '../src/curl/', | |
// mimic case in which two module point to the same url | |
'eaf.util': 'stuff/one', | |
'eaf.core': 'stuff/one' | |
} | |
}, | |
[ | |
'stuff/issue53' | |
] | |
).then( | |
function (issue53) { | |
write('SUCCESS: module loaded'); | |
clearTimeout(timeout); | |
}, | |
function (ex) { | |
write('FAILED: ' + ex.message); | |
clearTimeout(timeout); | |
} | |
); | |
var timeout = setTimeout(function () { | |
write('FAILED: timed out. check console or network activity'); | |
}, 3000); | |
function write (msg) { | |
curl('domReady!', function () { | |
document.body.appendChild(document.createElement('div')).innerHTML = msg; | |
}); | |
} | |
</script> | |
</head> | |
<body> | |
</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
// place this file at stuff/issue53.js | |
define(['eaf.util', 'eaf.core'], function (util, core) { | |
return "it works"; | |
}); |
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
define(1); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment