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.
cancelable property
Gets a value that indicates whether you can cancel an event's default action.
![]() ![]() |
Syntax
| JavaScript | |
|---|
Property values
Type: Boolean
Standards information
Remarks
If you cannot cancel the event, calling preventDefault has no effect.
When you create a custom event by using the createEvent method, you can set the cancelable property by using the initEvent method.
See also
- BeforeUnloadEvent
- CompositionEvent
- CustomEvent
- DragEvent
- Event
- FocusEvent
- KeyboardEvent
- MessageEvent
- MouseEvent
- MouseWheelEvent
- MSSiteModeEvent
- MutationEvent
- StorageEvent
- SVGZoomEvent
- TextEvent
- UIEvent
- Reference
- bubbles
- preventDefault
Show:

