Home / Function/ svelte_visitors.Root() — svelte Function Reference

svelte_visitors.Root() — svelte Function Reference

Architecture documentation for the svelte_visitors.Root() function in index.js from the svelte codebase.

Entity Profile

Dependency Diagram

graph TD
  80a8f9d0_d510_abe0_938c_6c1a6c4cfbe2["svelte_visitors.Root()"]
  f0404eed_e134_3c7c_7b38_1cb13c71f197["index.js"]
  80a8f9d0_d510_abe0_938c_6c1a6c4cfbe2 -->|defined in| f0404eed_e134_3c7c_7b38_1cb13c71f197
  style 80a8f9d0_d510_abe0_938c_6c1a6c4cfbe2 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/svelte/src/compiler/print/index.js lines 289–314

	Root(node, context) {
		if (node.options) {
			context.write('<svelte:options');

			for (const attribute of node.options.attributes) {
				context.write(' ');
				context.visit(attribute);
			}

			context.write(' />');
		}

		let started = false;

		for (const item of [node.module, node.instance, node.fragment, node.css]) {
			if (!item) continue;

			if (started) {
				context.margin();
				context.newline();
			}

			context.visit(item);
			started = true;
		}
	},

Domain

Subdomains

Frequently Asked Questions

What does svelte_visitors.Root() do?
svelte_visitors.Root() is a function in the svelte codebase, defined in packages/svelte/src/compiler/print/index.js.
Where is svelte_visitors.Root() defined?
svelte_visitors.Root() is defined in packages/svelte/src/compiler/print/index.js at line 289.

Analyze Your Own Codebase

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

Try Supermodel Free