preventDefault()

Cancels the event if it’s cancelable, without stopping further propagation of the event.

Declaration

preventDefault(): void;