-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.html
executable file
·54 lines (47 loc) · 1.34 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
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Balloons JS</title>
</head>
<body>
<script src="dist/Q.js"></script>
<script>
var test = Q.define();
var Foo = Q.define({
'name': 'Foo',
'init': function (id) {
console.log(id);
},
'sayFoo': function () {
console.log('foo');
return this;
}
});
var f = new Foo('fooarg');
// Bar
var Bar = Q.define({
'name': 'Bar',
'init': function () {
console.log(this.name);
},
'sayBar': function () {
console.log('bar');
}
});
var b = new Bar();
// Foobar
var Foobar = Q.define([Foo, Bar], {
'name': 'Foobar',
'init': function () {
console.log(this.name);
},
'sayFoobar': function () {
console.log('foobar');
}
});
var foobar = new Foobar();
</script>
</body>
</html>