yui3et-outoforder3.html revision e8a5970c271d6763123db8afb5ada4fb59d28516
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>EventTarget</title>
<script type="text/javascript" src="/build/yui/yui.js"></script>
<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) {
console.log(e.payload);
});
c.fire("R");
});
</script>
</head>
<body>
</body>
</html>