curl-amd
Version:
curl.js is small, fast, extensible module loader that handles AMD, CommonJS Modules/1.1, CSS, HTML/text, and legacy scripts.
27 lines (20 loc) • 543 B
HTML
<html>
<head>
<title>data-curl-run test (run.js is a script)</title>
<script>
function callback (value) {
write('SUCCESS: data-curl-run should execute.');
write((value == 1 ? 'SUCCESS' : 'FAILED') + ': data-curl-run should have loaded a module.');
function write (msg) {
curl('domReady!', function () {
document.body.appendChild(document.createElement('div')).innerHTML = msg;
});
}
}
</script>
<script src="../src/curl.js" data-curl-run="stuff/run-script.js"></script>
</head>
<body>
</body>
</html>