This page is In Progress

Notice: The WebPlatform project, supported by various stewards between 2012 and 2015, has been discontinued. This site is now available on github.

cancelable

Summary

Gets a value that indicates whether you can cancel an event’s default action.

Property of dom/Eventdom/Event

Syntax

Note: This property is read-only.

var cancelable = event.cancelable;

Return Value

Returns an object of type BooleanBoolean

Whether the event’s default action can be canceled.

Notes

If you cannot cancel the event, calling preventDefault has no effect. When you create a custom event by using the createEvent method, you can set the cancelable property by using the initEvent method.

Related specifications

DOM Level 3 Events
Working Draft

See also

Related pages

Attributions