Files
test-repo/tests/js/multiparser-html/html-template-literals.js
T
2020-05-08 00:55:46 +08:00

33 lines
575 B
JavaScript

const nestedFun = /* HTML */ `${outerExpr(1)}
<script>
const tpl = html\`<div>\${innerExpr(1)} ${outerExpr(2)}</div>\`;
</script>`;
const nestedFun2 = /* HTML */ `${outerExpr(1)}
<script>
const tpl = html\`\\n<div>\${innerExpr(1)} ${outerExpr(2)}</div>\\n\`;
</script>`;
setFoo(
html`<div>one</div>
<div>two</div>
<div>three</div>`,
secondArgument
);
setFoo(
html`<div>
<div>nested</div>
</div>
<div>two</div>
<div>three</div>`,
secondArgument
);
setFoo(
html`<div>
<div>nested</div>
</div>`,
secondArgument
);