pull/6898/head
Yuichiro Yamashita 5 years ago
parent da22d6306f
commit 11d12ab56a

@ -137,7 +137,7 @@ export default class Element extends Node {
needs_manual_style_scoping: boolean; needs_manual_style_scoping: boolean;
tag_expr: Expression; tag_expr: Expression;
is_dynamic_element() { get is_dynamic_element() {
return this.name === 'svelte:element'; return this.name === 'svelte:element';
} }

@ -221,7 +221,7 @@ export default class ElementWrapper extends Wrapper {
node.intro || node.outro || node.intro || node.outro ||
node.handlers.length > 0 || node.handlers.length > 0 ||
this.node.name === 'option' || this.node.name === 'option' ||
node.is_dynamic_element() || node.is_dynamic_element ||
renderer.options.dev renderer.options.dev
) { ) {
this.parent.cannot_use_innerhtml(); // need to use add_location this.parent.cannot_use_innerhtml(); // need to use add_location
@ -358,7 +358,7 @@ export default class ElementWrapper extends Wrapper {
); );
} }
if (this.node.is_dynamic_element()) { if (this.node.is_dynamic_element) {
block.renderer.dirty( block.renderer.dirty(
this.node.tag_expr.dynamic_dependencies() this.node.tag_expr.dynamic_dependencies()
); );
@ -427,7 +427,7 @@ export default class ElementWrapper extends Wrapper {
const name = this.node.namespace const name = this.node.namespace
? this.node.name ? this.node.name
: this.node.name.toUpperCase(); : this.node.name.toUpperCase();
const reference = this.node.is_dynamic_element() ? this.node.tag_expr.manipulate(block) : `"${name}"`; const reference = this.node.is_dynamic_element ? this.node.tag_expr.manipulate(block) : `"${name}"`;
if (this.node.namespace === namespaces.svg) { if (this.node.namespace === namespaces.svg) {
return x`@claim_svg_element(${nodes}, ${reference}, { ${attributes} })`; return x`@claim_svg_element(${nodes}, ${reference}, { ${attributes} })`;

Loading…
Cancel
Save