Raiondesu/eventhoven

Context in handlers?

Closed this issue · 3 comments

Currently, all eventhoven functions are contextless (have no this bound to them).
And this simplifies a lot of things.

However, handlers contain user's code. And a user may need to provide a separate context for them. So why not add it as a feature?

Maybe it's possible to achieve a feature described in #2 the same way?..

A temporary solution here would be to send bound handlers for subscriptions.

So I'll save this feature for later.

This could be made substantially easier if I decide to ditch the "multiple event arguments" feature. But... ugh.