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

Function in

packages/svelte/src/internal/client/dom/elements/transitions.js:234–267  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

232 var transition = {
233 is_global,
234 in() {
235 element.inert = inert;
236
237 if (!is_intro) {
238 outro?.abort();
239 outro?.reset?.();
240 return;
241 }
242
243 if (!is_outro) {
244 // if we intro then outro then intro again, we want to abort the first intro,
245 // if it's not a bidirectional transition
246 intro?.abort();
247 }
248
249 intro = animate(
250 element,
251 get_options(),
252 outro,
253 1,
254 () => {
255 dispatch_event(element, 'introstart');
256 },
257 () => {
258 dispatch_event(element, 'introend');
259
260 // Ensure we cancel the animation to prevent leaking
261 intro?.abort();
262 intro = current_options = undefined;
263
264 element.style.overflow = overflow;
265 }
266 );
267 },
268 out(fn) {
269 if (!is_outro) {
270 fn?.();

Callers

nothing calls this directly

Calls 5

animateFunction · 0.85
get_optionsFunction · 0.85
dispatch_eventFunction · 0.85
abortMethod · 0.80
resetMethod · 0.80

Tested by

no test coverage detected