Register for an event.