Skip to content

preventDefault

Prevents the default action of an event if it is cancelable.

Usage

ts
import { preventDefault } from 'rattail'

document.addEventListener('click', preventDefault)

Arguments

ArgTypeDefaults
eventEvent

Return

Type
void