samples/2021/12/dojo_demo2/index.html

80 lines
1.8 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<title>Dojo App</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="/node_modules/@fortawesome/fontawesome-free/css/all.css">
<script defer src="/node_modules/@fortawesome/fontawesome-free/js/all.js"></script>
<style>
.dijitArrowNodeInner {
display: none;
}
.dijitArrowNode {
}
</style>
<!--dojoConfig-->
<script>
// var arguments = []; // rhino fails if it's not set up
var dojoConfig = {
has: {
// "host-rhino": true, // why some rhino platform is a key to override baseUrl?
},
parseOnLoad: true,
isDebug: true,
async: true,
cacheBust: false, // Get "fresh" resources,
baseUrl: "/app",
packages: [
{name: "dojo", location: "/node_modules/dojo"},
{name: "dojox", location: "/node_modules/dojox"},
{name: "dijit", location: "/node_modules/dijit"},
{name: "app", location: "./"}
]
};
</script>
<!--load dojo toolkit-->
<script src="/node_modules/dojo/dojo.js"></script>
<script>
require([
"dojo/dom",
"dojo/parser",
"app/widgets/MainWidget.js",
"dojo/domReady!"
], function (dom, parser, MainWidget) {
// parser.parse();
// parseOnLoad: true doesn't run this. Why???
// parser.parse({
// scope: "app"
// });
/**
parser.parse({
"contextRequire": require,
"_dojoParserCtorMap": {
"./ContentPane": require('dijit/layout/ContentPane'),
}
});
**/
var greeting = dom.byId('root');
var widget = new MainWidget();
widget.placeAt(greeting);
widget.startup();
});
</script>
</head>
<body>
<div id="root"></div>
</body>
</html>