Created
December 17, 2013 04:08
-
-
Save jinwei233/7999903 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>kissy 自定义事件对象(Custom EventTarget) </title> | |
</head> | |
<body> | |
<script charset="utf-8" src="http://g.tbcdn.cn/kissy/k/1.4.0/seed.js"></script> | |
<script type="text/javascript"> | |
KISSY.use("event",function(S,Event){ | |
function Custom(id){ | |
} | |
S.augment(Custom, Event.Target); | |
var c1 = new Custom("c1"); | |
c1.on('start',function(){ | |
console.log('start'); | |
}); | |
c1.fire("start"); | |
}); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment