whenTransitionEnds() — vue Function Reference
Architecture documentation for the whenTransitionEnds() function in transition-util.ts from the vue codebase.
Entity Profile
Dependency Diagram
graph TD a91c7fdf_dfd4_ca46_afeb_f46ea34c1b98["whenTransitionEnds()"] 559a8e6b_5e4b_bfb9_73ff_310344cb5333["transition-util.ts"] a91c7fdf_dfd4_ca46_afeb_f46ea34c1b98 -->|defined in| 559a8e6b_5e4b_bfb9_73ff_310344cb5333 67ee7bcc_7bbc_0ec8_f207_3541819a38ef["getTransitionInfo()"] a91c7fdf_dfd4_ca46_afeb_f46ea34c1b98 -->|calls| 67ee7bcc_7bbc_0ec8_f207_3541819a38ef style a91c7fdf_dfd4_ca46_afeb_f46ea34c1b98 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
src/platforms/web/runtime/transition-util.ts lines 92–119
export function whenTransitionEnds(
el: Element,
expectedType: string | undefined,
cb: Function
) {
const { type, timeout, propCount } = getTransitionInfo(el, expectedType)
if (!type) return cb()
const event: string =
type === TRANSITION ? transitionEndEvent : animationEndEvent
let ended = 0
const end = () => {
el.removeEventListener(event, onEnd)
cb()
}
const onEnd = e => {
if (e.target === el) {
if (++ended >= propCount) {
end()
}
}
}
setTimeout(() => {
if (ended < propCount) {
end()
}
}, timeout + 1)
el.addEventListener(event, onEnd)
}
Domain
Subdomains
Defined In
Calls
Source
Frequently Asked Questions
What does whenTransitionEnds() do?
whenTransitionEnds() is a function in the vue codebase, defined in src/platforms/web/runtime/transition-util.ts.
Where is whenTransitionEnds() defined?
whenTransitionEnds() is defined in src/platforms/web/runtime/transition-util.ts at line 92.
What does whenTransitionEnds() call?
whenTransitionEnds() calls 1 function(s): getTransitionInfo.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free