|
|
|
|
@ -2,6 +2,7 @@
|
|
|
|
|
/** @import { AST } from '#compiler' */
|
|
|
|
|
/** @import { ComponentContext } from '../types.js' */
|
|
|
|
|
import * as b from '#compiler/builders';
|
|
|
|
|
import { create_push } from './shared/utils.js';
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @param {AST.HtmlTag} node
|
|
|
|
|
@ -10,9 +11,6 @@ import * as b from '#compiler/builders';
|
|
|
|
|
export function HtmlTag(node, context) {
|
|
|
|
|
const expression = /** @type {Expression} */ (context.visit(node.expression));
|
|
|
|
|
const call = b.call('$.html', expression);
|
|
|
|
|
context.state.template.push(
|
|
|
|
|
node.metadata.expression.has_await
|
|
|
|
|
? b.stmt(b.call('$$renderer.push', b.thunk(call, true)))
|
|
|
|
|
: call
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
context.state.template.push(create_push(call, node.metadata.expression));
|
|
|
|
|
}
|
|
|
|
|
|