Called from inside the script to register a new event handler.
Name of the event.
JavaScript function used to handle the event.