baseevents.html revision d0a16c48f3477794c63f4ff3242dc20db6a49295
<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>