Home / Function/ get_or_init_context_map() — svelte Function Reference

get_or_init_context_map() — svelte Function Reference

Architecture documentation for the get_or_init_context_map() function in context.js from the svelte codebase.

Entity Profile

Dependency Diagram

graph TD
  02c14626_696f_b641_6cae_75eb9cf06f66["get_or_init_context_map()"]
  48cf26f8_bf34_fd7a_3d52_cc963051e167["context.js"]
  02c14626_696f_b641_6cae_75eb9cf06f66 -->|defined in| 48cf26f8_bf34_fd7a_3d52_cc963051e167
  efa000ed_5584_e5fe_e342_766e8a0ac7e0["getContext()"]
  efa000ed_5584_e5fe_e342_766e8a0ac7e0 -->|calls| 02c14626_696f_b641_6cae_75eb9cf06f66
  19856960_6d67_2247_a949_4d23d9ab5d11["setContext()"]
  19856960_6d67_2247_a949_4d23d9ab5d11 -->|calls| 02c14626_696f_b641_6cae_75eb9cf06f66
  9dc2229b_0c7a_58c6_fe46_be48dc22f892["hasContext()"]
  9dc2229b_0c7a_58c6_fe46_be48dc22f892 -->|calls| 02c14626_696f_b641_6cae_75eb9cf06f66
  85d59622_bbcb_c843_9d90_1f8e300b3a85["getAllContexts()"]
  85d59622_bbcb_c843_9d90_1f8e300b3a85 -->|calls| 02c14626_696f_b641_6cae_75eb9cf06f66
  527edf8b_4346_b989_4525_d4188ff99c06["get_parent_context()"]
  02c14626_696f_b641_6cae_75eb9cf06f66 -->|calls| 527edf8b_4346_b989_4525_d4188ff99c06
  style 02c14626_696f_b641_6cae_75eb9cf06f66 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/svelte/src/internal/client/context.js lines 236–242

function get_or_init_context_map(name) {
	if (component_context === null) {
		e.lifecycle_outside_component(name);
	}

	return (component_context.c ??= new Map(get_parent_context(component_context) || undefined));
}

Domain

Subdomains

Frequently Asked Questions

What does get_or_init_context_map() do?
get_or_init_context_map() is a function in the svelte codebase, defined in packages/svelte/src/internal/client/context.js.
Where is get_or_init_context_map() defined?
get_or_init_context_map() is defined in packages/svelte/src/internal/client/context.js at line 236.
What does get_or_init_context_map() call?
get_or_init_context_map() calls 1 function(s): get_parent_context.
What calls get_or_init_context_map()?
get_or_init_context_map() is called by 4 function(s): getAllContexts, getContext, hasContext, setContext.

Analyze Your Own Codebase

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

Try Supermodel Free