(id2, render_statement, claim_statement, parent_node, no_detach)
| 14445 | } |
| 14446 | } |
| 14447 | add_element(id2, render_statement, claim_statement, parent_node, no_detach) { |
| 14448 | this.add_variable(id2); |
| 14449 | this.chunks.create.push(b`${id2} = ${render_statement};`); |
| 14450 | if (this.renderer.options.hydratable) { |
| 14451 | this.chunks.claim.push(b`${id2} = ${claim_statement || render_statement};`); |
| 14452 | } |
| 14453 | if (parent_node) { |
| 14454 | this.chunks.mount.push(b`@append(${parent_node}, ${id2});`); |
| 14455 | if (is_head(parent_node) && !no_detach) |
| 14456 | this.chunks.destroy.push(b`@detach(${id2});`); |
| 14457 | } else { |
| 14458 | this.chunks.mount.push(b`@insert(#target, ${id2}, #anchor);`); |
| 14459 | if (!no_detach) |
| 14460 | this.chunks.destroy.push(b`if (detaching) @detach(${id2});`); |
| 14461 | } |
| 14462 | } |
| 14463 | add_intro(local) { |
| 14464 | this.has_intros = this.has_intro_method = true; |
| 14465 | if (!local && this.parent) |
no test coverage detected