cancelable event attribute
Definition and usage
The cancelable event attribute returns a Boolean value indicating whether the event is a cancellable event.
An event is cancellable if it can prevent the default action.
To cancel an event, use preventDefault() method.
Example
Determine whether a specific event is cancellable:
var x = event.cancelable;
Syntax
event.cancelable
Technical details
Return value: |
Boolean value indicating whether the specified event is a cancellable event. Possible Values:
|
---|---|
DOM Version: | DOM Level 2 Events |
Browser Support
The numbers in the table indicate the first browser version that fully supports the property.
Properties | Chrome | IE | Firefox | Safari | Opera |
---|---|---|---|---|---|
cancelable | Support | 9.0 | Support | Support | Support |