Home / Function/ SvelteDocument() — svelte Function Reference

SvelteDocument() — svelte Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  a05051c0_a3f5_8da4_8bfe_aefd0f1fa826["SvelteDocument()"]
  d7156cb6_eaa9_987d_1468_e40cd6f72c1d["SvelteDocument.js"]
  a05051c0_a3f5_8da4_8bfe_aefd0f1fa826 -->|defined in| d7156cb6_eaa9_987d_1468_e40cd6f72c1d
  93255280_2c9b_bb00_5e12_b582f304b870["disallow_children()"]
  a05051c0_a3f5_8da4_8bfe_aefd0f1fa826 -->|calls| 93255280_2c9b_bb00_5e12_b582f304b870
  dec28128_93e1_8416_fd1b_acceab196151["is_event_attribute()"]
  a05051c0_a3f5_8da4_8bfe_aefd0f1fa826 -->|calls| dec28128_93e1_8416_fd1b_acceab196151
  c4c71899_68c3_f14e_c83a_aae820a526d1["illegal_element_attribute()"]
  a05051c0_a3f5_8da4_8bfe_aefd0f1fa826 -->|calls| c4c71899_68c3_f14e_c83a_aae820a526d1
  style a05051c0_a3f5_8da4_8bfe_aefd0f1fa826 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/svelte/src/compiler/phases/2-analyze/visitors/SvelteDocument.js lines 11–24

export function SvelteDocument(node, context) {
	disallow_children(node);

	for (const attribute of node.attributes) {
		if (
			attribute.type === 'SpreadAttribute' ||
			(attribute.type === 'Attribute' && !is_event_attribute(attribute))
		) {
			e.illegal_element_attribute(attribute, 'svelte:document');
		}
	}

	context.next();
}

Domain

Subdomains

Frequently Asked Questions

What does SvelteDocument() do?
SvelteDocument() is a function in the svelte codebase, defined in packages/svelte/src/compiler/phases/2-analyze/visitors/SvelteDocument.js.
Where is SvelteDocument() defined?
SvelteDocument() is defined in packages/svelte/src/compiler/phases/2-analyze/visitors/SvelteDocument.js at line 11.
What does SvelteDocument() call?
SvelteDocument() calls 3 function(s): disallow_children, illegal_element_attribute, is_event_attribute.

Analyze Your Own Codebase

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

Try Supermodel Free