block() — svelte Function Reference
Architecture documentation for the block() function in index.js from the svelte codebase.
Entity Profile
Dependency Diagram
graph TD 139b5520_1d69_2489_cf79_ff7f67682f82["block()"] f0404eed_e134_3c7c_7b38_1cb13c71f197["index.js"] 139b5520_1d69_2489_cf79_ff7f67682f82 -->|defined in| f0404eed_e134_3c7c_7b38_1cb13c71f197 762e2645_df97_dd47_1f3c_ed224a27b85a["base_element()"] 762e2645_df97_dd47_1f3c_ed224a27b85a -->|calls| 139b5520_1d69_2489_cf79_ff7f67682f82 b7c774b0_a062_49fb_8173_3089fe5dcded["svelte_visitors.Script()"] b7c774b0_a062_49fb_8173_3089fe5dcded -->|calls| 139b5520_1d69_2489_cf79_ff7f67682f82 43f6f0d6_54df_ed9d_afa4_6155d4b6b0d8["svelte_visitors.AwaitBlock()"] 43f6f0d6_54df_ed9d_afa4_6155d4b6b0d8 -->|calls| 139b5520_1d69_2489_cf79_ff7f67682f82 19206bd9_4e5d_dfa3_9e48_75e3187f98e8["svelte_visitors.EachBlock()"] 19206bd9_4e5d_dfa3_9e48_75e3187f98e8 -->|calls| 139b5520_1d69_2489_cf79_ff7f67682f82 49f2cdbc_a434_ac53_67a3_4b06ad38cafd["svelte_visitors.IfBlock()"] 49f2cdbc_a434_ac53_67a3_4b06ad38cafd -->|calls| 139b5520_1d69_2489_cf79_ff7f67682f82 0b5e4a6f_7a9c_92e0_338e_6ae291203a03["svelte_visitors.KeyBlock()"] 0b5e4a6f_7a9c_92e0_338e_6ae291203a03 -->|calls| 139b5520_1d69_2489_cf79_ff7f67682f82 d8aa62ff_1881_a326_7970_c34e0ef4cc87["svelte_visitors.SnippetBlock()"] d8aa62ff_1881_a326_7970_c34e0ef4cc87 -->|calls| 139b5520_1d69_2489_cf79_ff7f67682f82 bf5d5240_8295_eb9d_761a_40c36ac83580["svelte_visitors.SvelteComponent()"] bf5d5240_8295_eb9d_761a_40c36ac83580 -->|calls| 139b5520_1d69_2489_cf79_ff7f67682f82 db7bcfe6_94b2_81da_e75d_1ea0ae9d514f["svelte_visitors.SvelteElement()"] db7bcfe6_94b2_81da_e75d_1ea0ae9d514f -->|calls| 139b5520_1d69_2489_cf79_ff7f67682f82 style 139b5520_1d69_2489_cf79_ff7f67682f82 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/svelte/src/compiler/print/index.js lines 40–57
function block(context, node, allow_inline = false) {
const child_context = context.new();
child_context.visit(node);
if (child_context.empty()) {
return;
}
if (allow_inline && !child_context.multiline) {
context.append(child_context);
} else {
context.indent();
context.newline();
context.append(child_context);
context.dedent();
context.newline();
}
}
Domain
Subdomains
Defined In
Called By
Source
Frequently Asked Questions
What does block() do?
block() is a function in the svelte codebase, defined in packages/svelte/src/compiler/print/index.js.
Where is block() defined?
block() is defined in packages/svelte/src/compiler/print/index.js at line 40.
What calls block()?
block() is called by 9 function(s): base_element, svelte_visitors.AwaitBlock, svelte_visitors.EachBlock, svelte_visitors.IfBlock, svelte_visitors.KeyBlock, svelte_visitors.Script, svelte_visitors.SnippetBlock, svelte_visitors.SvelteComponent, and 1 more.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free