Cancelable event properties
The event objectDefinitions and usages
The cancelable event returns a Boolean value. True if the default action associated with the event can be canceled using the preventDefault() method, otherwise it is fasle.
Grammar
The following example is to detect whether the event that occurred was a cancelable event:
<html>
<head>
<meta charset="utf-8">
Online tutorials for W3Cschool (w3cschool.cn)
<script>
function myFunction(e){
alert(e.cancelable);
}
</script>
</head>
<body>
Click on this paragraph and a warning box will pop up if the event can be canceled. </p>
</body>
</html>
Try it out . . .
The event object