AttachTag.js — svelte Source File
Architecture documentation for AttachTag.js, a javascript file in the svelte codebase. 3 imports, 1 dependents.
Entity Profile
Dependency Diagram
graph LR 3bf183de_51b2_6888_893b_2c53de029374["AttachTag.js"] 18e3101f_3e97_34c3_7373_b587af4b78e1["builders.js"] 3bf183de_51b2_6888_893b_2c53de029374 --> 18e3101f_3e97_34c3_7373_b587af4b78e1 d04d7971_88df_542d_dd4f_26170ce6f581["utils.js"] 3bf183de_51b2_6888_893b_2c53de029374 --> d04d7971_88df_542d_dd4f_26170ce6f581 66243dec_e2be_a66d_3992_3ea42cf964b5["build_expression"] 3bf183de_51b2_6888_893b_2c53de029374 --> 66243dec_e2be_a66d_3992_3ea42cf964b5 7665e008_f37d_b860_a594_f2539a66af4e["transform-client.js"] 7665e008_f37d_b860_a594_f2539a66af4e --> 3bf183de_51b2_6888_893b_2c53de029374 style 3bf183de_51b2_6888_893b_2c53de029374 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
/** @import { AST } from '#compiler' */
/** @import { ComponentContext } from '../types' */
import * as b from '../../../../utils/builders.js';
import { build_expression } from './shared/utils.js';
/**
* @param {AST.AttachTag} node
* @param {ComponentContext} context
*/
export function AttachTag(node, context) {
const expression = build_expression(context, node.expression, node.metadata.expression);
let statement = b.stmt(b.call('$.attach', context.state.node, b.thunk(expression)));
if (node.metadata.expression.is_async()) {
statement = b.stmt(
b.call(
'$.run_after_blockers',
node.metadata.expression.blockers(),
b.thunk(b.block([statement]))
)
);
}
context.state.init.push(statement);
context.next();
}
Domain
Subdomains
Functions
Dependencies
Source
Frequently Asked Questions
What does AttachTag.js do?
AttachTag.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 AttachTag.js?
AttachTag.js defines 1 function(s): AttachTag.
What does AttachTag.js depend on?
AttachTag.js imports 3 module(s): build_expression, builders.js, utils.js.
What files import AttachTag.js?
AttachTag.js is imported by 1 file(s): transform-client.js.
Where is AttachTag.js in the architecture?
AttachTag.js is located at packages/svelte/src/compiler/phases/3-transform/client/visitors/AttachTag.js (domain: Compiler, subdomain: Transformer, directory: packages/svelte/src/compiler/phases/3-transform/client/visitors).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free