3.0: Applying dispatchEvent()

Applying a feature introduced in #4556