Select_with_rich_content() — svelte Function Reference
Architecture documentation for the Select_with_rich_content() function in index.svelte.js from the svelte codebase.
Entity Profile
Dependency Diagram
graph TD 967a6285_7cd3_94b5_9cde_7a20b82000a8["Select_with_rich_content()"] d601d506_3b9a_e686_46fe_fd74ae63e473["index.svelte.js"] 967a6285_7cd3_94b5_9cde_7a20b82000a8 -->|defined in| d601d506_3b9a_e686_46fe_fd74ae63e473 36cb0589_61d6_78b8_43aa_45f2ca390f20["opt()"] 967a6285_7cd3_94b5_9cde_7a20b82000a8 -->|calls| 36cb0589_61d6_78b8_43aa_45f2ca390f20 c3110e01_9b46_5c59_87cb_a720856fe44e["Option()"] 967a6285_7cd3_94b5_9cde_7a20b82000a8 -->|calls| c3110e01_9b46_5c59_87cb_a720856fe44e 59acd37b_1727_5871_af48_f6a7ff332446["option_snippet()"] 967a6285_7cd3_94b5_9cde_7a20b82000a8 -->|calls| 59acd37b_1727_5871_af48_f6a7ff332446 e022a6d1_0e68_4d79_9cf3_2fa6a06dd1e7["option_snippet2()"] 967a6285_7cd3_94b5_9cde_7a20b82000a8 -->|calls| e022a6d1_0e68_4d79_9cf3_2fa6a06dd1e7 818b0ee9_84e8_c41e_4d75_9f89e1bfdc67["conditional_option()"] 967a6285_7cd3_94b5_9cde_7a20b82000a8 -->|calls| 818b0ee9_84e8_c41e_4d75_9f89e1bfdc67 style 967a6285_7cd3_94b5_9cde_7a20b82000a8 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/svelte/tests/snapshot/samples/select-with-rich-content/_expected/client/index.svelte.js lines 59–412
export default function Select_with_rich_content($$anchor) {
let items = [1, 2, 3];
let show = true;
let html = '<option>From HTML</option>';
var fragment = root();
var select = $.first_child(fragment);
var option_4 = $.child(select);
$.customizable_select(option_4, () => {
var anchor = $.child(option_4);
var fragment_1 = option_content();
$.append(anchor, fragment_1);
});
$.reset(select);
var select_1 = $.sibling(select, 2);
$.each(select_1, 5, () => items, $.index, ($$anchor, item) => {
var option_5 = root_5();
var text = $.child(option_5, true);
$.reset(option_5);
var option_5_value = {};
$.template_effect(() => {
$.set_text(text, $.get(item));
if (option_5_value !== (option_5_value = $.get(item))) {
option_5.__value = $.get(item);
}
});
$.append($$anchor, option_5);
});
$.reset(select_1);
var select_2 = $.sibling(select_1, 2);
var node = $.child(select_2);
{
var consequent = ($$anchor) => {
var option_6 = root_6();
$.append($$anchor, option_6);
};
$.if(node, ($$render) => {
if (show) $$render(consequent);
});
}
$.reset(select_2);
var select_3 = $.sibling(select_2, 2);
var node_1 = $.child(select_3);
$.key(node_1, () => items, ($$anchor) => {
var option_7 = root_7();
$.append($$anchor, option_7);
});
$.reset(select_3);
var select_4 = $.sibling(select_3, 2);
$.customizable_select(select_4, () => {
var anchor_1 = $.child(select_4);
var fragment_2 = select_content();
var node_2 = $.first_child(fragment_2);
opt(node_2);
$.append(anchor_1, fragment_2);
});
var select_5 = $.sibling(select_4, 2);
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does Select_with_rich_content() do?
Select_with_rich_content() is a function in the svelte codebase, defined in packages/svelte/tests/snapshot/samples/select-with-rich-content/_expected/client/index.svelte.js.
Where is Select_with_rich_content() defined?
Select_with_rich_content() is defined in packages/svelte/tests/snapshot/samples/select-with-rich-content/_expected/client/index.svelte.js at line 59.
What does Select_with_rich_content() call?
Select_with_rich_content() calls 5 function(s): Option, conditional_option, opt, option_snippet, option_snippet2.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free