Home / Function/ set_context_after_init() — svelte Function Reference

set_context_after_init() — svelte Function Reference

Architecture documentation for the set_context_after_init() function in errors.js from the svelte codebase.

Entity Profile

Dependency Diagram

graph TD
  464e07e5_b0ee_28eb_a91c_76fb0dfd1d2e["set_context_after_init()"]
  ff387d97_d6d2_81e0_e731_656552709d27["errors.js"]
  464e07e5_b0ee_28eb_a91c_76fb0dfd1d2e -->|defined in| ff387d97_d6d2_81e0_e731_656552709d27
  19856960_6d67_2247_a949_4d23d9ab5d11["setContext()"]
  19856960_6d67_2247_a949_4d23d9ab5d11 -->|calls| 464e07e5_b0ee_28eb_a91c_76fb0dfd1d2e
  style 464e07e5_b0ee_28eb_a91c_76fb0dfd1d2e fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/svelte/src/internal/client/errors.js lines 417–427

export function set_context_after_init() {
	if (DEV) {
		const error = new Error(`set_context_after_init\n\`setContext\` must be called when a component first initializes, not in a subsequent effect or after an \`await\` expression\nhttps://svelte.dev/e/set_context_after_init`);

		error.name = 'Svelte error';

		throw error;
	} else {
		throw new Error(`https://svelte.dev/e/set_context_after_init`);
	}
}

Domain

Subdomains

Called By

Frequently Asked Questions

What does set_context_after_init() do?
set_context_after_init() is a function in the svelte codebase, defined in packages/svelte/src/internal/client/errors.js.
Where is set_context_after_init() defined?
set_context_after_init() is defined in packages/svelte/src/internal/client/errors.js at line 417.
What calls set_context_after_init()?
set_context_after_init() is called by 1 function(s): setContext.

Analyze Your Own Codebase

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

Try Supermodel Free