eventRegistry: change to invoke the onEvent handler