Added method for triggering custom events