I\'d like to have something like this work:
var Events=require(\'events\'),
test=new Events.EventEmitter,
scope={
prop:true
};
test.on(\
No, because the this value in the listener is the event emitter object.
However what you can do is this
var scope = {
...
};
scope._events = test._events;
test.emit.call(scope, ...);
The reason your event handler did not get called is because all the handlers are stored in ._events so if you copy ._events over it should work.