|
|
|
@ -806,12 +806,14 @@ export default class ElementWrapper extends Wrapper {
|
|
|
|
if (this.node.is_dynamic_element) {
|
|
|
|
if (this.node.is_dynamic_element) {
|
|
|
|
// call attribute bindings for custom element if tag is custom element
|
|
|
|
// call attribute bindings for custom element if tag is custom element
|
|
|
|
const tag = this.node.tag_expr.manipulate(block);
|
|
|
|
const tag = this.node.tag_expr.manipulate(block);
|
|
|
|
const attr_update = b`
|
|
|
|
const attr_update = this.node.namespace === namespaces.svg
|
|
|
|
if (/-/.test(${tag})) {
|
|
|
|
? b`${fn}(${this.var}, ${data});`
|
|
|
|
@set_custom_element_data_map(${this.var}, ${data});
|
|
|
|
: b`
|
|
|
|
} else {
|
|
|
|
if (/-/.test(${tag})) {
|
|
|
|
${fn}(${this.var}, ${data});
|
|
|
|
@set_custom_element_data_map(${this.var}, ${data});
|
|
|
|
}`;
|
|
|
|
} else {
|
|
|
|
|
|
|
|
${fn}(${this.var}, ${data});
|
|
|
|
|
|
|
|
}`;
|
|
|
|
block.chunks.hydrate.push(attr_update);
|
|
|
|
block.chunks.hydrate.push(attr_update);
|
|
|
|
block.chunks.update.push(b`
|
|
|
|
block.chunks.update.push(b`
|
|
|
|
${data} = @get_spread_update(${levels}, [${updates}]);
|
|
|
|
${data} = @get_spread_update(${levels}, [${updates}]);
|
|
|
|
|