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

event.defaultPrevented Redirect 1

« DOM Reference


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).


bool = event.defaultPrevented 


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

Browser compatibility

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari
Basic support 18 6.0 (6.0) 9.0 11.0 5.0
Feature Android Firefox Mobile (Gecko) IE Mobile Opera Mobile Safari Mobile
Basic support ? 6.0 (6.0) ? ? 5.0


Document Tags and Contributors

Last updated by: Sheppy,