This page is Almost Ready

Notice: The WebPlatform project, supported by various stewards between 2012 and 2015, has been discontinued. This site is now available on github.



Gets whether the default action should be canceled.

Property of dom/Eventdom/Event


Note: This property is read-only.

var shouldPreventDefault = event.defaultPrevented;

Return Value

Returns an object of type BooleanBoolean

Whether the default action should be canceled.


 Use this property to determine whether the default action of an event was prevented.


You can set the value of this property to true while processing an event, by calling the preventDefault method. If the event was initialized with the cancelable parameter of initEvent set to false, the default action cannot be prevented.

Related specifications

DOM Level 3 Events
Working Draft

See also

Related pages