You just need access to the real 'runtime' object to be able to call 'trigger'. 'runtime' is a property of all object instances and types, so it works in plugin functions, but if you create a standalone function or your own object you need to make sure you have a way to access 'runtime'.