Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

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:
© 2017 Microsoft