joyent/node — Issue #2890: Event listener scope should not be rewritten by EventEmitter scope.
Author: Shogun147
Created: 2012-03-07 14:32:32+00:00
State: open

Hi all,

I dont know why this is not discussed, but i think this is a must for full future event system.

On event emit, the listener method gets EventEmitter scope, and i think this is wrong.
For anonymous function maybe this is ok, but in case the listener method is from an object then he must get his own scope back and work with object itself.

There should me minimum a way with which we could set a scope for the listener or something like that.

So why this work in this way and how to get the right one?