Fixes #6024: Adds support for ":before" and ":after" events

":after" events cannot be cancelled; all handlers run and the trigger always returns true.