Skip to main content
cngx-src documentation

onTransitionDone

Functioncore/utilsv0.1.0

projects/core/utils/transition.util.ts

Description#

Listens for the longest CSS transition on an element, then invokes onDone.

The longest transition is the property with the greatest transition-duration + transition-delay total, so a themed delay extends the wait instead of cutting it short. Automatically falls back to a timeout if transitionend never fires.

Signature#

onTransitionDone(el: HTMLElement, onDone)

Parameters#

@paramelHTMLElement
@paramonDone

Returns#

TransitionDoneHandle

A {@link TransitionDoneHandle} - flush() completes immediately, cancel() tears down without invoking onDone.