config.html
1.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<!DOCTYPE html>
<html>
<head>
<title>require.js: Config Test</title>
<script>
function done() {
doh= require("doh");
doh.register(
"config",
[
function config(t){
t.is("blue", s.color);
t.is("dimple-blue", d.color);
t.is("You called a function", f());
}
]
);
doh.run();
}
var s, d, f,
require = {
baseUrl: "./",
deps: ["require", "simple", "dimple", "func", "doh"],
callback: function (require, simple, dimple, func) {
s = simple;
d = dimple;
f = func;
done();
}
};
</script>
<script type="text/javascript" src="requirejs-setup.js"></script>
<script type="text/javascript" src="../../../../dojo.js"></script>
</head>
<body>
<h1>require.js: Config Test</h1>
<p>Tests require being defined as an object with init and ready configuration.</p>
<p>Check console for messages.</p>
</body>
</html>