Home / Function/ build_custom_element_attribute_update_assignment() — svelte Function Reference

build_custom_element_attribute_update_assignment() — svelte Function Reference

Architecture documentation for the build_custom_element_attribute_update_assignment() function in RegularElement.js from the svelte codebase.

Function javascript Compiler Transformer calls 1 called by 1

Entity Profile

Dependency Diagram

graph TD
  e0b7227f_e61b_faf8_5693_879c87a34300["build_custom_element_attribute_update_assignment()"]
  4610488f_3cf2_5f73_043e_da0aa9d026fe["RegularElement.js"]
  e0b7227f_e61b_faf8_5693_879c87a34300 -->|defined in| 4610488f_3cf2_5f73_043e_da0aa9d026fe
  1e3b81f2_cd53_e5a5_0140_a9af38facf99["RegularElement()"]
  1e3b81f2_cd53_e5a5_0140_a9af38facf99 -->|calls| e0b7227f_e61b_faf8_5693_879c87a34300
  e31bc2c2_91c1_b9a9_f78a_2832bddce6c5["build_attribute_value()"]
  e0b7227f_e61b_faf8_5693_879c87a34300 -->|calls| e31bc2c2_91c1_b9a9_f78a_2832bddce6c5
  style e0b7227f_e61b_faf8_5693_879c87a34300 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/svelte/src/compiler/phases/3-transform/client/visitors/RegularElement.js lines 707–718

function build_custom_element_attribute_update_assignment(node_id, attribute, context) {
	const { value, has_state } = build_attribute_value(attribute.value, context);

	// don't lowercase name, as we set the element's property, which might be case sensitive
	const call = b.call('$.set_custom_element_data', node_id, b.literal(attribute.name), value);

	// this is different from other updates — it doesn't get grouped,
	// because set_custom_element_data may not be idempotent
	const update = has_state ? b.call('$.template_effect', b.thunk(call)) : call;

	context.state.init.push(b.stmt(update));
}

Domain

Subdomains

Called By

Frequently Asked Questions

What does build_custom_element_attribute_update_assignment() do?
build_custom_element_attribute_update_assignment() is a function in the svelte codebase, defined in packages/svelte/src/compiler/phases/3-transform/client/visitors/RegularElement.js.
Where is build_custom_element_attribute_update_assignment() defined?
build_custom_element_attribute_update_assignment() is defined in packages/svelte/src/compiler/phases/3-transform/client/visitors/RegularElement.js at line 707.
What does build_custom_element_attribute_update_assignment() call?
build_custom_element_attribute_update_assignment() calls 1 function(s): build_attribute_value.
What calls build_custom_element_attribute_update_assignment()?
build_custom_element_attribute_update_assignment() is called by 1 function(s): RegularElement.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free