|
|
@@ -11,7 +11,7 @@ EmitterProto.on = function(event, fn){
|
|
|
return this
|
|
|
}
|
|
|
|
|
|
-Emitter.prototype.once = function(event, fn){
|
|
|
+EmitterProto.once = function(event, fn){
|
|
|
var self = this
|
|
|
this._cbs = this._cbs || {}
|
|
|
|
|
|
@@ -25,7 +25,7 @@ Emitter.prototype.once = function(event, fn){
|
|
|
return this
|
|
|
}
|
|
|
|
|
|
-Emitter.prototype.off = function(event, fn){
|
|
|
+EmitterProto.off = function(event, fn){
|
|
|
this._cbs = this._cbs || {}
|
|
|
|
|
|
// all
|
|
|
@@ -56,7 +56,7 @@ Emitter.prototype.off = function(event, fn){
|
|
|
return this
|
|
|
}
|
|
|
|
|
|
-Emitter.prototype.emit = function(event, a, b, c){
|
|
|
+EmitterProto.emit = function(event, a, b, c){
|
|
|
this._cbs = this._cbs || {}
|
|
|
var callbacks = this._cbs[event]
|
|
|
|