-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
executable file
·82 lines (77 loc) · 2.2 KB
/
index.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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="utf-8"/>
<title>DO测试页面</title>
<meta name="DO" content=""/>
<meta name="keywords" content=""/>
<link href="http://style.china.alibaba.com/css/lib/fdev-v4/reset/reset-min.css" rel="stylesheet"/>
<script src="http://style.china.alibaba.com/js/lib/fdev-v4/core/fdev-min.js"></script>
<script src="Sandbox.js"></script>
<script src="DO.js"></script>
<base target="_blank"/>
</head>
<body>
<div id="doc">
<div id="alibar">alibar</div>
<div id="header" class="w952">header</div>
<div id="content" class="w952">
<div class="mod-test" data-mod-config2='{"a":"12333333333"}'></div>
<div class="mod-test" data-mod-config='{"a":"132"}'></div>
</div>
<div id="footer">footer</div>
</div>
<script>
DO.debug(true);
DO.register('~mod-test',function(sandbox){
console.log(sandbox);
sandbox.extraTest();
return {
init:function(){
sandbox.listen(['message','message2'],function(event,data){
console.log(event);
console.log(data);
},this);
sandbox.listen('DO.ready',function(){
console.log('DO.ready');
});
},
destroy:function(moduleId){
console.log(moduleId+'destroy');
}
}
});
DO.register('mod-test2',function(sandbox){
return {
init:function(){
sandbox.notify('message',{
a:1,
b:2
});
console.log('modle','get')
console.log(DO.get('mod-test'/*moduleId*/)('node'/*type*/));
DO.extraTest();
},
children:{
'child-test':{
init:function(parentId,selfId){
console.log(3,'APP-->chinld'+parentId);
console.log(3,'APP-->chinld'+selfId);
}
},
'child-test2':{
init:function(parentId,selfId){
console.log(3,'APP-->chinld'+parentId);
console.log(3,'APP-->chinld'+selfId);
}
}
},
destroy:function(){
}
};
});
DO.startAll();
//jQuery.getScript('api.js');
</script>
</body>
</html>