forked from cujojs/wire
/
nested3.html
41 lines (36 loc) · 974 Bytes
/
nested3.html
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 lang="en-US">
<head>
<meta charset="UTF-8">
<title>NExted types test</title>
<script src="util/doh/runner.js"></script>
<script src="test-config.js"></script>
<script type="text/javascript">
// Simple example of wiring in objects by reference using JSON ref syntax
require(['wire'], function(wire) {
wire({
debug: { module: 'wire/debug' },
a: 'a',
object: {
nameRef: { $ref: 'a' },
b: { $ref: 'a' }
}
}).then(
function(context) {
doh.register('nested', [
function (doh) {
// doh.assertEqual(context.a, context.object.nested.a);
}
]);
doh.run();
},
function(err) {
console.error(err);
}
);
});
</script>
</head>
<body>
</body>
</html>