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
<html>
<head>
<title>Base Event Test</title>
</head>
<body>
<script>
YUI({filter:"raw"}).use("base", function(Y) {
var parent = new Parent({
after: {
'child:test' : function(e) {
}
},
on: {
'child:test' : function(e) {
}
}
});
var parent2 = new Parent({
after: {
'child:test' : function(e) {
}
},
on: {
'child:test' : function(e) {
}
}
});
test: function() {
},
// Default bubbleTargets
_bubbleTargets:parent
}, {
NAME:"child"
});
var c1 = new Child();
c1.id = "c1";
var c2 = new Child({
bubbleTargets:null // anything falsey
});
c2.id = "c2";
var c3 = new Child({
bubbleTargets:[parent, parent2]
});
c3.id = "c3";
c1.test();
c2.test();
c3.test();
});
</script>
</body>
</html>