-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.js
More file actions
34 lines (34 loc) · 664 Bytes
/
test.js
File metadata and controls
34 lines (34 loc) · 664 Bytes
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
var Root = require('./root');
var A = Root.define({
a: 1
});
var D = Root.define({
d: 2
});
var B = Root.define({
initialize: function () {
console.log('init...')
},
say: function (cnt) {
console.log("B" + cnt);
this.callParent(cnt);
}
});
var BB = Root.define({
extend: B,
say: function (cnt) {
console.log("BB" + cnt);
this.callParent(cnt);
}
});
var BBB = Root.define({
extend: BB,
mixin: [A, [D]],
say: function (cnt) {
console.log("BBB" + cnt);
this.callParent(cnt);
}
});
var bb = new BBB({c: 2});
bb.say("-say");
console.log(bb.a, bb.d, bb.options);