yui3et-outoforder3.html revision e8a5970c271d6763123db8afb5ada4fb59d28516
<html lang="en">
<head>
<title>EventTarget</title>
<script type="text/javascript">
YUI({ filter: "raw"}).use("event-custom-complex", "dump", function (Y) {
var c = new Y.EventTarget({
prefix: 'et1',
emitFacade:true
});
var g = new Y.EventTarget({
prefix: 'et2',
emitFacade:true
});
g.publish("W", {
defaultFn: function() {
console.log('defaultFn W');
}
});
c.publish("R", {
defaultFn: function() {
console.log('defaultFn R');
g.fire("W", {payload:"should be first"});
}
});
c.after("R", function() {
console.log('after R');
g.fire("W", {payload:"should be second"});
});
g.after("W", function(e) {
});
c.fire("R");
});
</script>
</head>
<body>
</body>
</html>