Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

cancelable Event Attribute

cancelable Event Attribute

Event Object Reference 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:

Runoob Tutorial(runoob.com)

Click this paragraph; if the event is cancelable, an alert box will pop up.

Try it »


Event Object Reference Event Object