I’m building a framework which relies heavily on user-registered events,
All I really wanted to ask, was; is there an accepted order for calling event callbacks? i.e. should they be called in the order they were registered, or in reverse-registered order? Or should I let users specify a priority?
Thanks for the help.
I’d offer both – i.e.:
and
That way, users of your API can specifiy the priority if it’s important to them.
If the priority is not specified, then order-of-registration is probably the expected callback order.