UNPKG

curl-amd

Version:

curl.js is small, fast, extensible module loader that handles AMD, CommonJS Modules/1.1, CSS, HTML/text, and legacy scripts.

49 lines (38 loc) 797 B
<!DOCTYPE HTML> <html> <head> <title>js! plugin !test option</title> <script> curl = { paths: { curl: '../src/curl' }, pluginPath: 'curl/plugin' }; </script> <script src="../src/curl.js" type="text/javascript"></script> <script type="text/javascript"> curl( [ // 'js!stuff/plain_old.js!order', 'js!stuff/plain_old_nonexistent.js?foo!order!exports=foo.bar', 'domReady!' ] ).then( function () { write('FAILED: test for global variable succeeded when it shouldn\'t have'); }, function () { write('SUCCESS: test for global variable failed as it should have'); } ); function write (msg) { curl(['domReady!'], function () { document.body.appendChild(document.createElement('div')).innerHTML = msg; }) } </script> </head> <body> </body> </html>