Fixes #1025: Implemented support for class-level events.