cancelable
Summary
Gets a value that indicates whether you can cancel an event’s default action.
Property of dom/Eventdom/Event
Syntax
Note: This property is read-only.
var cancelable = event.cancelable;
Return Value
Returns an object of type BooleanBoolean
Whether the event’s default action can be canceled.
Notes
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.
Related specifications
- DOM Level 3 Events
- Working Draft
See also
Related pages
- SVGZoomEventSVGZoomEvent
- BeforeUnloadEventBeforeUnloadEvent
- CompositionEventCompositionEvent
- CustomEventCustomEvent
- EventEvent
- DragEventDragEvent
- FocusEventFocusEvent
- KeyboardEventKeyboardEvent
- MessageEventMessageEvent
- MouseEventMouseEvent
- MouseWheelEventMouseWheelEvent
- MutationEventMutationEvent
- StorageEventStorageEvent
- TextEventTextEvent
- UIEventUIEvent
Reference
- bubblesbubbles
- preventDefaultpreventDefault
Attributions
Microsoft Developer Network: [Windows Internet Explorer API reference Article]