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.

34 lines (27 loc) 683 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({ apiContext: this, apiName: 'curl2' }); write('SUCCESS: curl should should create non-conflicting curl2()'); } catch (ex) { write('FAILED: curl should should create non-conflicting curl2(): ' + ex.message); } write((orig == curl ? 'SUCCESS' : 'FAILED') + ': curl should restore previous curl()'); function write (msg) { document.body.appendChild(document.createElement('div')).innerHTML = msg; } </script> </html>