Add support for event handling.