-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathexample.html
48 lines (47 loc) · 1.38 KB
/
example.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
<!doctype html>
<html>
<head>
<title>efyea.js example</title>
</head>
<body>
<script src="js/app/lib/jquery-1.9.1.min.js"></script>
<script src="js/app/lib/mustache.js"></script>
<script src="js/app/efyea.js"></script>
<script src="js/app/ext/core/modules.js"></script>
<script src="js/app/ext/core/pubsub.js"></script>
<script src="js/app/ext/mustache/templates.js"></script>
<script src="js/app/sandbox/sandbox.js"></script>
<script>
(function(core){
core.config({
'test':'test'
});
core.register("module1", function(sandbox) {
/*
sandbox.waitforit('init', function () {
console.log("module1 init");
});
*/
sandbox.init(function(){
console.log("module1 short init");
});
/*
sandbox.waitforit('destroy', function(){
console.log("module1 destroy");
});
*/
sandbox.destroy(function(){
console.log("module1 short destroy");
});
}).register("module2", function(sandbox) {
sandbox.waitforit('init', function () {
console.log("module2 init");
});
sandbox.waitforit('destroy', function () {
console.log("module2 destroy");
});
}).startAll().stopAll();
}(ef.extensions.core));
</script>
</body>
</html>