HtmlTag.js — svelte Source File
Architecture documentation for HtmlTag.js, a javascript file in the svelte codebase. 3 imports, 1 dependents.
Entity Profile
Dependency Diagram
graph LR 3381a8c8_9d5a_f618_4029_20ad1baae02d["HtmlTag.js"] 74eddc85_a390_2aab_af5a_ef32b77d5430["utils.js"] 3381a8c8_9d5a_f618_4029_20ad1baae02d --> 74eddc85_a390_2aab_af5a_ef32b77d5430 6487918e_a8f7_315c_caf5_9694fc4edde7["create_child_block"] 3381a8c8_9d5a_f618_4029_20ad1baae02d --> 6487918e_a8f7_315c_caf5_9694fc4edde7 95c28355_f14c_c3cd_5a03_d5a53ca255bc["builders"] 3381a8c8_9d5a_f618_4029_20ad1baae02d --> 95c28355_f14c_c3cd_5a03_d5a53ca255bc 86cf8685_38fa_3a1c_9b81_21c452968289["transform-server.js"] 86cf8685_38fa_3a1c_9b81_21c452968289 --> 3381a8c8_9d5a_f618_4029_20ad1baae02d style 3381a8c8_9d5a_f618_4029_20ad1baae02d fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
/** @import { Expression } from 'estree' */
/** @import { AST } from '#compiler' */
/** @import { ComponentContext } from '../types.js' */
import * as b from '#compiler/builders';
import { create_child_block } from './shared/utils.js';
/**
* @param {AST.HtmlTag} node
* @param {ComponentContext} context
*/
export function HtmlTag(node, context) {
const expression = b.call('$.html', /** @type {Expression} */ (context.visit(node.expression)));
if (node.metadata.expression.is_async()) {
context.state.template.push(
...create_child_block(
[b.stmt(b.call('$$renderer.push', expression))],
node.metadata.expression.blockers(),
node.metadata.expression.has_await
)
);
} else {
context.state.template.push(expression);
}
}
Domain
Subdomains
Functions
Dependencies
- builders
- create_child_block
- utils.js
Source
Frequently Asked Questions
What does HtmlTag.js do?
HtmlTag.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 HtmlTag.js?
HtmlTag.js defines 1 function(s): HtmlTag.
What does HtmlTag.js depend on?
HtmlTag.js imports 3 module(s): builders, create_child_block, utils.js.
What files import HtmlTag.js?
HtmlTag.js is imported by 1 file(s): transform-server.js.
Where is HtmlTag.js in the architecture?
HtmlTag.js is located at packages/svelte/src/compiler/phases/3-transform/server/visitors/HtmlTag.js (domain: Compiler, subdomain: Transformer, directory: packages/svelte/src/compiler/phases/3-transform/server/visitors).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free