Generalize event dispatch