Defines the action to be performed when the event is handled. Calling this method will register the listener.
The action block.