[idl-generator] Add event handler support