Raiondesu / eventhoven

Event manager that composes events effortlessly 🎵
https://www.npmjs.com/package/eventhoven
MIT License
5 stars 1 forks source link

Context in handlers? #10

Closed Raiondesu closed 5 years ago

Raiondesu commented 5 years ago

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?

Raiondesu commented 5 years ago

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

Raiondesu commented 5 years ago

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

So I'll save this feature for later.

Raiondesu commented 5 years ago

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