Skip to content

Instantly share code, notes, and snippets.

@qoelet
Created September 7, 2010 05:25
Show Gist options
  • Save qoelet/567905 to your computer and use it in GitHub Desktop.
Save qoelet/567905 to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html>
<head>
<title>Dojo - Namespaces!</title>
<link href="dojo1.5/dojo/resources/dojo.css">
<script src="dojo1.5/dojo/dojo.js" type="text/javascript"></script>
</head>
<body>
<div id="hello">Hello Dojo!</div>
<script type="text/javascript">
dojo.registerModulePath("kenny", "/kenny");
dojo.require("kenny.calculator");
// req for async loading
dojo.addOnLoad(function() {
dojo.body().innerHTML = "so 2 + 2 = " + kenny.calculator.sum(2,2);
});
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment