preventDefault method
void
preventDefault()
inherited
The preventDefault()
method of the Event
interface tells the that
if the event does not get explicitly handled, its default action should
not be taken as it normally would be.
The event continues to propagate as usual,
unless one of its event listeners calls
Event.stopPropagation
or Event.stopImmediatePropagation
,
either of which terminates propagation at once.
As noted below, calling preventDefault()
for a
non-cancelable event, such as one dispatched via
EventTarget.dispatchEvent
, without specifying
cancelable: true
has no effect.
Implementation
external void preventDefault();