3.0: Applying dispatchEvent()

Applying a feature introduced in #4556
You need to pass the table as the subject. The event is triggered from a query, not the table