EventHandler()
ts
function EventHandler(): string;This function returns the name of the event handler that triggered the execution of the currently running script.
TIP
For file-based events, use CtxRelPath() and CtxRelTargetPath() to get the paths of the files that triggered the event. As of v8.0.4, CtxVFSName() provides the name of the VFS the event refers to, and EventCtx() returns the whole event context as a single object. As of v8.0.5, CtxUsername() provides the username of the user whose session triggered the event, and as of v8.0.6, CtxVirtualSite() provides the ID of the virtual site the event occurred in.
Example
js
var evth = EventHandler();
Log(evth); // will log (for example): AfterFileUpload