set_value() — svelte Function Reference
Architecture documentation for the set_value() function in attributes.js from the svelte codebase.
Entity Profile
Dependency Diagram
graph TD d5013b26_4f11_a540_4e0e_615bff6582b2["set_value()"] 0acd2537_e1bf_d7ae_30d5_407378cfa4d3["attributes.js"] d5013b26_4f11_a540_4e0e_615bff6582b2 -->|defined in| 0acd2537_e1bf_d7ae_30d5_407378cfa4d3 318223ca_87d5_a1fe_45e4_c1304dea610b["get_attributes()"] d5013b26_4f11_a540_4e0e_615bff6582b2 -->|calls| 318223ca_87d5_a1fe_45e4_c1304dea610b style d5013b26_4f11_a540_4e0e_615bff6582b2 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/svelte/src/internal/client/dom/elements/attributes.js lines 76–93
export function set_value(element, value) {
var attributes = get_attributes(element);
if (
attributes.value ===
(attributes.value =
// treat null and undefined the same for the initial value
value ?? undefined) ||
// @ts-expect-error
// `progress` elements always need their value set when it's `0`
(element.value === value && (value !== 0 || element.nodeName !== 'PROGRESS'))
) {
return;
}
// @ts-expect-error
element.value = value ?? '';
}
Domain
Subdomains
Calls
Source
Frequently Asked Questions
What does set_value() do?
set_value() is a function in the svelte codebase, defined in packages/svelte/src/internal/client/dom/elements/attributes.js.
Where is set_value() defined?
set_value() is defined in packages/svelte/src/internal/client/dom/elements/attributes.js at line 76.
What does set_value() call?
set_value() calls 1 function(s): get_attributes.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free