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.

29 lines (22 loc) 611 B
<!DOCTYPE HTML> <html> <head> <title>noConflict define test</title> <script> var define = function () {}, orig = define; </script> <script src="../src/curl.js" type="text/javascript"></script> </head> <body> </body> <script type="text/javascript"> curl({ defineContext: this, defineName: 'define2' }); write((orig == define ? 'SUCCESS' : 'FAILED') + ': curl should restore previous define()'); write((define2 ? 'SUCCESS' : 'FAILED') + ': curl should create non-conflicting define2()'); function write (msg) { document.body.appendChild(document.createElement('div')).innerHTML = msg; } </script> </html>