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.

35 lines (29 loc) 593 B
<!DOCTYPE HTML> <html> <head> <title>noConflict api test</title> <script> var curl = function () {}, orig = curl; </script> <script src="../src/curl.js" type="text/javascript"></script> </head> <body> </body> <script type="text/javascript"> try { curl({ paths: { curl: '../src/curl/' } } ); write('FAILED: curl should not overwrite global curl'); } catch (ex) { write('SUCCESS: curl should throw when it conflicts with no recourse: ' + ex.message); } function write (msg) { document.body.appendChild(document.createElement('div')).innerHTML = msg; } </script> </html>