Find out if a specific event is cancelable:
The result of x could be:
The cancelable event property returns a Boolean value indicating whether or not an event is a cancelable event.
The event is cancelable if it is possible to prevent the events default action.
To cancel an event, use the preventDefault() method.
The numbers in the table specify the first browser version that fully supports the property.
Property | |||||
---|---|---|---|---|---|
cancelable | Yes | 9.0 | Yes | Yes | Yes |
Return Value: | A Boolean, indicating whether the specified event is a
cancelable event.
Possible values:
|
---|---|
DOM Version: | DOM Level 2 Events |