Registers a callback function to be executed when the specified event occurs.
The name of the event to register the callback for.
The callback function to be called when the event is triggered.
A function that, when called, will unregister the callback from the event.
Registers a callback function to be executed when the specified event occurs.