cancelable Event Attribute
Event Object
Definition and Usage
The cancelable event returns a Boolean value. If the default action associated with the event can be canceled using the preventDefault() method, it returns true; otherwise it returns false.
Syntax
event
.cancelable
Example
Example
The following example checks whether the event that occurred is a cancelable event:
Click this paragraph; if the event is cancelable, an alert box will pop up.
Try it »
Event Object