← Back to release summary

ontransition{run, start, cancel} event handler attributes

Category
JavaScript
Type
New or changed feature
Status
Enabled by default (Chrome 87)
Intent stage
Evaluate readiness to ship

Summary

The ontransitionrun, ontransitionstart, and ontransitioncancel event handler attributes allow developers to add event listeners for 'transitionrun', 'transitionstart', and ‘transitioncancel' events on elements, Document objects, and Window objects. An example of how this might be used: target.ontransitioncancel = () => { console.log('transition was cancelled!'); }

Motivation

These features are part of the stable css-transitions-1 spec, and have shipped in other browsers a long time ago.

Standards & signals

Docs: https://output.jsbin.com/siyenag/quiet

Explainers: N/A - spec has been stable for a long time

View on chromestatus.com