We're looking for a user researcher to understand the needs of developers and designers. Is this you or someone you know? Check out the post: https://mzl.la/2IGzdXS

Summary

Returns a boolean indicating whether or not event.preventDefault() was called on the event.

Note: You should use this instead of the non-standard, deprecated getPreventDefault() method (see bug 691151).

Syntax

bool = event.defaultPrevented 

Example

 if (e.defaultPrevented) {
   /* the default was prevented */
 }

Specifications

Specification Status Comment
DOM
The definition of 'Event.defaultPrevented()' in that specification.
Living Standard  

Browser compatibility

FeatureChromeEdgeFirefoxInternet ExplorerOperaSafari
Basic support18 Yes69115
FeatureAndroid webviewChrome for AndroidEdge mobileFirefox for AndroidOpera AndroidiOS SafariSamsung Internet
Basic support1818 Yes6115 ?

Document Tags and Contributors

Tags: 
Last updated by: fscholz,