Registers a one-time event listener for a specific event.
The event name.
The callback function to execute when the event is triggered. This handler will be removed after execution.