Event emitter hook for every events #171

Closed
Yomguithereal opened this Issue Aug 26, 2015 · 3 comments

Projects

None yet

2 participants

@Yomguithereal

Hello @chjj, would you be willing to consider to extend the blessed event emitter to accept a listener handling every events? Something of this kind:

node.onAny(function(type, payload) {});
@chjj
Owner
chjj commented Aug 28, 2015

Yeah, I would consider that. I'd rather make it special event though: element.on('emit') or element.on('event'). The only thing I worry about is the bubbling. It might be a hit to performance if these events hve to bubble along with the actual event. We'll see. Maybe I'm just being paranoid, or we could just have it not bubble.

@Yomguithereal

Adding an event event seems to be a good and simple way to do so even if this feels a bit meta :).

To add some background to this issue this is where I monkey patch the blessed emitter to be able to catch events efficiently with react-blessed.

@chjj chjj closed this in e4900bb Sep 3, 2015
@Yomguithereal

Thanks @chjj. Will switch to 0.1.81 asap.

@Yomguithereal Yomguithereal referenced this issue in Yomguithereal/react-blessed Sep 3, 2015
Closed

Switch to blessed 0.1.81 #15

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment