defaultPrevented property

Gets a value that indicates whether the default action should be canceled.

Document Object Model (DOM) Level 3 Events Specification, Section 4.1Internet Explorer 9

 

Syntax

JavaScript

p = object.defaultPrevented

 

Property values

Type: Boolean

true (true)

The default action should be prevented.

false (false)

The default action is allowed.

Standards information

Remarks

You can set the defaultPrevented 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.

See also

BeforeUnloadEvent
CompositionEvent
CustomEvent
DragEvent
Event
FocusEvent
KeyboardEvent
MessageEvent
MouseEvent
MouseWheelEvent
MSSiteModeEvent
MutationEvent
StorageEvent
SVGZoomEvent
TextEvent
UIEvent
Reference
cancelable
preventDefault

 

 

Show:
© 2014 Microsoft