Instance Method

preventDefault

Prevents the browser from performing the default action for an event.

Declaration

void preventDefault();

Discussion

Use this method to indicate that your extension has already fully handled the event; you don’t want the browser to do anything. Note that preventing the default action does not stop an event from propagating.

See Also

Preventing the Default Action

defaultPrevented

A Boolean value that indicates whether the event’s default action has been prevented.