[idl-generator] Add event handler support

This is a comment. I will rephrase it to make it clear