cancel() — svelte Function Reference
Architecture documentation for the cancel() function in animation-helpers.js from the svelte codebase.
Entity Profile
Dependency Diagram
graph TD df3cdc96_a659_fa69_dff0_1ba8a0324e29["cancel()"] 3ae2bea3_65e8_95e9_3e41_46d185d3488f["Animation"] df3cdc96_a659_fa69_dff0_1ba8a0324e29 -->|defined in| 3ae2bea3_65e8_95e9_3e41_46d185d3488f 1c33c97a_4675_4426_fe65_8c610da46296["oncancel()"] df3cdc96_a659_fa69_dff0_1ba8a0324e29 -->|calls| 1c33c97a_4675_4426_fe65_8c610da46296 style df3cdc96_a659_fa69_dff0_1ba8a0324e29 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/svelte/tests/animation-helpers.js lines 130–142
cancel() {
if (this.currentTime > 0 && this.currentTime < this.#duration) {
this.#apply_keyframe(0);
}
// @ts-ignore
this.currentTime = null;
// @ts-ignore
this.startTime = null;
this.playState = 'idle';
this.#oncancel();
raf.animations.delete(this);
}
Domain
Subdomains
Defined In
Calls
Source
Frequently Asked Questions
What does cancel() do?
cancel() is a function in the svelte codebase, defined in packages/svelte/tests/animation-helpers.js.
Where is cancel() defined?
cancel() is defined in packages/svelte/tests/animation-helpers.js at line 130.
What does cancel() call?
cancel() calls 1 function(s): oncancel.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free