Skip to content

Instantly share code, notes, and snippets.

@unscriptable
Created January 28, 2012 17:14
Show Gist options
  • Save unscriptable/1695074 to your computer and use it in GitHub Desktop.
Save unscriptable/1695074 to your computer and use it in GitHub Desktop.
reproduce curl.js issue 53
<!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>
// place this file at stuff/issue53.js
define(['eaf.util', 'eaf.core'], function (util, core) {
return "it works";
});
define(1);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment