Home / File/ SvelteBody.js — svelte Source File

SvelteBody.js — svelte Source File

Architecture documentation for SvelteBody.js, a javascript file in the svelte codebase. 6 imports, 1 dependents.

File javascript Compiler Transformer 6 imports 1 dependents 1 functions

Entity Profile

Dependency Diagram

graph LR
  5e444026_daca_5ccd_9d36_f41e51895650["SvelteBody.js"]
  495501a4_a342_6a4d_ac11_e3e2fee8b218["errors.js"]
  5e444026_daca_5ccd_9d36_f41e51895650 --> 495501a4_a342_6a4d_ac11_e3e2fee8b218
  a146f6ac_0088_8736_b6ce_318f9f115170["e"]
  5e444026_daca_5ccd_9d36_f41e51895650 --> a146f6ac_0088_8736_b6ce_318f9f115170
  0c5c28a7_226d_4e7c_e75e_0853c0a9fc2c["ast.js"]
  5e444026_daca_5ccd_9d36_f41e51895650 --> 0c5c28a7_226d_4e7c_e75e_0853c0a9fc2c
  e9a2c29e_d0ca_ab9f_b86f_f22ff802db91["is_event_attribute"]
  5e444026_daca_5ccd_9d36_f41e51895650 --> e9a2c29e_d0ca_ab9f_b86f_f22ff802db91
  f738fdc4_6546_2e7b_cfe1_49e3cb800752["special-element.js"]
  5e444026_daca_5ccd_9d36_f41e51895650 --> f738fdc4_6546_2e7b_cfe1_49e3cb800752
  cdcd4a9e_8be5_ea03_69d9_c5b2dd208707["disallow_children"]
  5e444026_daca_5ccd_9d36_f41e51895650 --> cdcd4a9e_8be5_ea03_69d9_c5b2dd208707
  4aa8a188_84d4_0274_ed83_cac0ab1d3572["index.js"]
  4aa8a188_84d4_0274_ed83_cac0ab1d3572 --> 5e444026_daca_5ccd_9d36_f41e51895650
  style 5e444026_daca_5ccd_9d36_f41e51895650 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

/** @import { AST } from '#compiler' */
/** @import { Context } from '../types' */
import * as e from '../../../errors.js';
import { is_event_attribute } from '../../../utils/ast.js';
import { disallow_children } from './shared/special-element.js';

/**
 * @param {AST.SvelteBody} node
 * @param {Context} context
 */
export function SvelteBody(node, context) {
	disallow_children(node);
	for (const attribute of node.attributes) {
		if (
			attribute.type === 'SpreadAttribute' ||
			(attribute.type === 'Attribute' && !is_event_attribute(attribute))
		) {
			e.svelte_body_illegal_attribute(attribute);
		}
	}
	context.next();
}

Domain

Subdomains

Functions

Frequently Asked Questions

What does SvelteBody.js do?
SvelteBody.js is a source file in the svelte codebase, written in javascript. It belongs to the Compiler domain, Transformer subdomain.
What functions are defined in SvelteBody.js?
SvelteBody.js defines 1 function(s): SvelteBody.
What does SvelteBody.js depend on?
SvelteBody.js imports 6 module(s): ast.js, disallow_children, e, errors.js, is_event_attribute, special-element.js.
What files import SvelteBody.js?
SvelteBody.js is imported by 1 file(s): index.js.
Where is SvelteBody.js in the architecture?
SvelteBody.js is located at packages/svelte/src/compiler/phases/2-analyze/visitors/SvelteBody.js (domain: Compiler, subdomain: Transformer, directory: packages/svelte/src/compiler/phases/2-analyze/visitors).

Analyze Your Own Codebase

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

Try Supermodel Free