Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
},
dispatchEvent(event: IEvent): void {
event.target = this;
let currentTarget = this;
do {
event.currentTarget = currentTarget;
event.currentTarget.emit(event.type, event);
currentTarget = currentTarget.parent;
} while (currentTarget && event.bubbles);
}
};
Object.assign(DisplayObject.prototype, EventDispatcherMixin);
Object.assign(EventEmitter.prototype, EventDispatcherMixin);
Router.prototype.removeListener = function(message, handler) {
return EventEmitter.prototype.removeListener.call(
this
, message.$code
, handler
)
}
var EventEmitter = require('eventemitter3').EventEmitter
var util = require('util')
var wire = require('./')
var log = require('../util/logger').createLogger('wire:router')
var on = EventEmitter.prototype.on
function Router() {
if (!(this instanceof Router)) {
return new Router()
}
EventEmitter.call(this)
}
util.inherits(Router, EventEmitter)
Router.prototype.on = function(message, handler) {
return on.call(this, message.$code, handler)
}
Router.prototype.removeListener = function(message, handler) {