event_chain.html revision 401d3c02d890d39b7a48d94e0a9c1830f8aade42
<!doctype html>
<html>
<head>
<title>Test Page</title>
<link type="text/css" rel="stylesheet" href="/assets/dpSyntaxHighlighter.css">
</head>
<body>
<div class="markup">
</div>
<script type="text/javascript" src="/build/yui/yui.js"></script>
<script type="text/javascript" src="/build/oop/oop.js"></script>
<script type="text/javascript" src="/build/event/event.js"></script>
<script type="text/javascript" src="/build/event-custom/event-custom.js"></script>
<script type="text/javascript">
YUI().use('*', function (Y) {
var et = new Y.Event.Target;
et.id = 1;
et.publish('a', {
emitFacade: true,
defaultFn: function (e) {
Y.log('defaultFn: ' + this.id);
setTimeout(function () {
et.fire('b',e);
},10)
}
});
et.publish('b', {
emitFacade: true,
defaultFn: function (e) { alert("THIS AIN'T RIGHT"); }
});
et.on('b', function (e) {
Y.log('defaultFn: ' + this.id);
e.preventDefault();
});
et.fire('a');
});
</script>
<script type="text/javascript" src="/assets/dpSyntaxHighlighter.js" ></script>
<script type="text/javascript" src="/assets/dpSyntaxHighlightExample.js"></script>
</body>
</html>