4
<title>Test Page</title>
5
<style type="text/css">
11
<body class="yui-skin-sam">
12
<input type="text" value="" id="k"><label for="k"><-- up,up,dn,dn,l,r,l,r,b,a</label>
15
<script src="../../../../build/yui/yui.js"></script>
17
<script src="http://yui.yahooapis.com/3.2.0/build/yui/yui-min.js"></script>
18
<script src="../../../../build/event/event-synthetic.js"></script>
22
useBrowserConsole: false,
23
//lazyEventFacade: true,
25
}).use('event-synthetic', function (Y) {
27
Y.on('yui:log', function (e) {
28
Y.one("#output").append("<li>" + e.msg + "</li>");
31
Y.Event.define('konami', {
32
on: function (node, sub, ce) {
35
node.on(guid + '|keydown', function (e) {
39
if (e.keyCode === sub.keys[sub.progress]) {
40
if (++sub.progress === sub.keys.length) {
42
ce.detach(sub.fn, sub.context);
51
keys : [38,38,40,40,37,39,37,39,66,65],
52
keys : [38,38,40,40,37,39,37,39,66,65],
56
detach: function (node, sub, ce) {
57
node.detach(sub._evtGuid + '|*');
61
Y.one('#k').on('konami', function (e) {
62
Y.one('#output').append('<li>UNICORNS!</li>');