Home / Function/ add_locations() — svelte Function Reference

add_locations() — svelte Function Reference

Architecture documentation for the add_locations() function in elements.js from the svelte codebase.

Entity Profile

Dependency Diagram

graph TD
  b60eae80_564e_15ac_1592_842fc3d3102d["add_locations()"]
  3ab252dc_d6ce_1bc4_5889_915271359ea9["elements.js"]
  b60eae80_564e_15ac_1592_842fc3d3102d -->|defined in| 3ab252dc_d6ce_1bc4_5889_915271359ea9
  233b118d_2b48_c1cf_411e_4773053d6a2b["assign_locations()"]
  b60eae80_564e_15ac_1592_842fc3d3102d -->|calls| 233b118d_2b48_c1cf_411e_4773053d6a2b
  style b60eae80_564e_15ac_1592_842fc3d3102d fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/svelte/src/internal/client/dev/elements.js lines 13–22

export function add_locations(fn, filename, locations) {
	return (/** @type {any[]} */ ...args) => {
		const dom = fn(...args);

		var node = hydrating ? dom : dom.nodeType === DOCUMENT_FRAGMENT_NODE ? dom.firstChild : dom;
		assign_locations(node, filename, locations);

		return dom;
	};
}

Domain

Subdomains

Frequently Asked Questions

What does add_locations() do?
add_locations() is a function in the svelte codebase, defined in packages/svelte/src/internal/client/dev/elements.js.
Where is add_locations() defined?
add_locations() is defined in packages/svelte/src/internal/client/dev/elements.js at line 13.
What does add_locations() call?
add_locations() calls 1 function(s): assign_locations.

Analyze Your Own Codebase

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

Try Supermodel Free