Added conditionals for event firing

What is the meaning of documentation