|
|
|
@ -633,6 +633,10 @@ function build_custom_element_attribute_update_assignment(node_id, attribute, co
|
|
|
|
|
const name = attribute.name; // don't lowercase, as we set the element's property, which might be case sensitive
|
|
|
|
|
let { has_call, value } = build_attribute_value(attribute.value, context);
|
|
|
|
|
|
|
|
|
|
/** @type {Statement} */
|
|
|
|
|
let update;
|
|
|
|
|
|
|
|
|
|
if (context.state.analysis.runes) {
|
|
|
|
|
// if it's quoted, it's an attribute, otherwise it's a property
|
|
|
|
|
const is_attribute = is_array(attribute.value);
|
|
|
|
|
|
|
|
|
@ -646,9 +650,12 @@ function build_custom_element_attribute_update_assignment(node_id, attribute, co
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const update = is_attribute
|
|
|
|
|
update = is_attribute
|
|
|
|
|
? b.stmt(b.call('$.set_attribute', node_id, b.literal(name), value))
|
|
|
|
|
: b.stmt(b.assignment('=', b.member(node_id, name), value));
|
|
|
|
|
} else {
|
|
|
|
|
update = b.stmt(b.call('$.set_custom_element_data', node_id, b.literal(name), value));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (attribute.metadata.expression.has_state) {
|
|
|
|
|
if (has_call) {
|
|
|
|
|