Concord
Concord copied to clipboard
Add World:onEmit
This function would allow you to define a callback that would be called before an event is emitted.
This is really useful for debugging event delegation.
This callback would get a reference to the World, so you could emit another event from this callback (A note should be made here that this new event should be ignored by :onEmit
so that it doesn't end up in an infinite emit-onEmit-emit-onEmit
loop).