You don't need to know JS. Simply add a script in your event with one line of code:
runtime.callFunction(runtime.globalVars.funcName)
, where funcName is the global variable containing the name of a function you want to call.
One problem with this method is that it may not work if you choose advanced minification when exporting.