UNPKG

@cran/vue.core

Version:

Cranberry Vue Core Utilities

12 lines (11 loc) 362 B
import { waitForAnimations } from "./waitForAnimations"; const VAE = Symbol("vue.animation.end"); export function whenAnimationEnds(el, timeout, resolve) { const id = el[VAE] = Symbol("Element.VAE"); void waitForAnimations(el, timeout) .then(function resolveIfNotStale() { if (id === el[VAE]) { resolve(); } }); }