UNPKG

can

Version:

MIT-licensed, client-side, JavaScript framework that makes building rich web applications easy.

36 lines (33 loc) 1.25 kB
<!DOCTYPE html> <html> <head> <title>require.js: Simple Test</title> <script type="text/javascript" src="requirejs-setup.js"></script> <script type="text/javascript" src="../../../../dojo.js"></script> <script>moreSimpleTests = true</script> <script type="text/javascript" src="simple-tests.js"></script> <script type="text/javascript"> //This test is only in the HTML since it uses an URL for a require //argument. It will not work well in say, the Rhino tests. var path = location.href.replace(/simple\.html$/, "foo"), index = path.indexOf(":"), noProtocolPath = path.substring(index + 1, path.length).replace(/foo/, "bar"); require(["doh", path, noProtocolPath], function() { doh.register( "fooBar", [ function fooBar(t){ t.is("foo", foo.name); t.is("bar", bar.name); } ] ); doh.run(); }); </script> </head> <body> <h1>require.js: Simple Test</h1> <p>Check console for messages</p> </body> </html>