Home / Function/ destroy_effect_children() — svelte Function Reference

destroy_effect_children() — svelte Function Reference

Architecture documentation for the destroy_effect_children() function in effects.js from the svelte codebase.

Entity Profile

Dependency Diagram

graph TD
  5ca6cce3_c139_2ec0_550b_59f1139f113b["destroy_effect_children()"]
  1ae6fa4e_16ee_acdf_5e28_17eb0819fddb["effects.js"]
  5ca6cce3_c139_2ec0_550b_59f1139f113b -->|defined in| 1ae6fa4e_16ee_acdf_5e28_17eb0819fddb
  410f774f_2d1a_7114_fcba_b292ed7cae3a["destroy_effect()"]
  410f774f_2d1a_7114_fcba_b292ed7cae3a -->|calls| 5ca6cce3_c139_2ec0_550b_59f1139f113b
  19374192_7fff_dd82_3581_d62b472dfbdd["update_effect()"]
  19374192_7fff_dd82_3581_d62b472dfbdd -->|calls| 5ca6cce3_c139_2ec0_550b_59f1139f113b
  e95d0513_ce71_430f_7ef3_577e736f42c1["without_reactive_context()"]
  5ca6cce3_c139_2ec0_550b_59f1139f113b -->|calls| e95d0513_ce71_430f_7ef3_577e736f42c1
  410f774f_2d1a_7114_fcba_b292ed7cae3a["destroy_effect()"]
  5ca6cce3_c139_2ec0_550b_59f1139f113b -->|calls| 410f774f_2d1a_7114_fcba_b292ed7cae3a
  style 5ca6cce3_c139_2ec0_550b_59f1139f113b fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/svelte/src/internal/client/reactivity/effects.js lines 446–470

export function destroy_effect_children(signal, remove_dom = false) {
	var effect = signal.first;
	signal.first = signal.last = null;

	while (effect !== null) {
		const controller = effect.ac;

		if (controller !== null) {
			without_reactive_context(() => {
				controller.abort(STALE_REACTION);
			});
		}

		var next = effect.next;

		if ((effect.f & ROOT_EFFECT) !== 0) {
			// this is now an independent root
			effect.parent = null;
		} else {
			destroy_effect(effect, remove_dom);
		}

		effect = next;
	}
}

Domain

Subdomains

Frequently Asked Questions

What does destroy_effect_children() do?
destroy_effect_children() is a function in the svelte codebase, defined in packages/svelte/src/internal/client/reactivity/effects.js.
Where is destroy_effect_children() defined?
destroy_effect_children() is defined in packages/svelte/src/internal/client/reactivity/effects.js at line 446.
What does destroy_effect_children() call?
destroy_effect_children() calls 2 function(s): destroy_effect, without_reactive_context.
What calls destroy_effect_children()?
destroy_effect_children() is called by 2 function(s): destroy_effect, update_effect.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free