不要怂,就是干,撸起袖子干!

Commit e81e72e6 by Sascha Depold

Proxy all parameters of an event to the respective other emitter

1 parent 42706422
Showing with 3 additions and 2 deletions
...@@ -127,8 +127,9 @@ module.exports = (function() { ...@@ -127,8 +127,9 @@ module.exports = (function() {
options.events = Utils._.difference(options.events, options.skipEvents) options.events = Utils._.difference(options.events, options.skipEvents)
options.events.forEach(function (eventKey) { options.events.forEach(function (eventKey) {
this.on(eventKey, function (result) { this.on(eventKey, function () {
emitter.emit(eventKey, result) var args = [ eventKey ].concat([].slice.apply(arguments))
emitter.emit.apply(emitter, args)
}) })
}.bind(this)) }.bind(this))
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!