> onEvent() is not supposed to be called if there is a hook defined for the event: at least I see it this way

Good point. I've sent you a PR with a new implementation that will make sure `onEvent` is only called when a old fashion call to `registerEvent` was made. That should work with all scenarios nicely. Let me know if you see another mistake in that logic ;)