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 (40 loc) 989 B
<!DOCTYPE HTML> <html> <head> <title>test for github issue #37</title> <script src="../src/curl.js" type="text/javascript"></script> <!--<script src="support/curl-0.5.3.js"></script>--> <!--<script src="support/curl-0.5.4.js"></script>--> <script type="text/javascript"> curl( { baseUrl: '../src', // default path paths: { 'css!': '../test/stuff' // default path for css! resources } }, [ 'css!second.css', 'domReady!' ] ).then( function () { var doc = document, testEl = doc.getElementById('test'), msg, testVal; testVal = window.getComputedStyle ? window.getComputedStyle(testEl, null).textTransform : testEl.currentStyle.textTransform; msg = testVal.toLowerCase() == 'uppercase' ? 'SUCCESS: css file loaded.' : 'FAILED: css file not loaded.'; doc.body.appendChild(doc.createElement('div')).innerHTML = msg; } ); </script> </head> <body> <p id="test">Success or failure message below:</p> </body> </html>