MCPcopy
hub / github.com/sveltejs/svelte / cancel

Method cancel

packages/svelte/tests/animation-helpers.js:130–142  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

128 }
129
130 cancel() {
131 if (this.currentTime > 0 && this.currentTime < this.#duration) {
132 this.#apply_keyframe(0);
133 }
134 // @ts-ignore
135 this.currentTime = null;
136 // @ts-ignore
137 this.startTime = null;
138
139 this.playState = 'idle';
140 this.#oncancel();
141 raf.animations.delete(this);
142 }
143
144 /** @param {() => {}} fn */
145 set onfinish(fn) {

Callers 1

animateFunction · 0.80

Calls 2

#apply_keyframeMethod · 0.95
deleteMethod · 0.45

Tested by

no test coverage detected