HTML ontransitioncancel Event Attribute
Description
The ontransitioncancel event attribute runs a script when a CSS transition is cancelled before it finishes: when the transition-property is removed, the element gets display: none, or the property is changed to a value that starts a new transition.
The event is a TransitionEvent with the properties propertyName (the CSS property, for example "transform"), elapsedTime (in seconds, not counting transition-delay) and pseudoElement. A separate event fires for each transitioned property, so a transition on all that changes three properties fires three events; check event.propertyName to handle only one. Transition events bubble.
Syntax
<element ontransitioncancel="script">
Values
- scriptThe name of the script to use when the event has been triggered.
Example
Browser Support
The following information will show you the current browser support for the HTML ontransitioncancel event attribute. Hover over a browser icon to see the version that first introduced support for this HTML event attribute.
Desktop





Tablets & Mobile





