What does event.cancel() do?

Exactly.