Added forceCancel method to simulate security errors that call the cancel function for on() listeners.