pwn:JavaScript事件系统的100 SLOC处理

时间:2024-06-04 11:10:05
【文件属性】:

文件名称:pwn:JavaScript事件系统的100 SLOC处理

文件大小:5KB

文件格式:ZIP

更新时间:2024-06-04 11:10:05

CoffeeScript

wn JavaScript事件系统的<100 SLOC破坏。 从您自己的构造对象中委托它! 使用obj.prototype = Object.create(pwn); pwn您的对象没错-甚至不必担心您的构造函数-那是一些伪古典的垃圾。 你把它铺好了。 注册新的事件监听器 // obj.on(event, callback, context) obj . on ( 'change' , func , this ) ; // register listener with this context obj . on ( 'change' , func ) ; // register listener with obj's context 取消注册旧的事件监听器 // obj.off(event, callback, context) obj . off ( 'change' ,


【文件预览】:
pwn-master
----pwn.litcoffee(3KB)
----bower.json(449B)
----pwn.js(3KB)
----LICENSE(1KB)
----README.md(2KB)
----.gitignore(7B)
----package.json(619B)

网友评论