Closed alexey13 closed 4 years ago
no, but this works everywhere:
render(document.body, html([htmlContent]));
if you have repeated use cases, use a Map
to avoid re-parsing each time the same html blob.
const fakeplates = new Map;
const setplate = html => {
const fakeplate = [html];
fakeplates.set(html, fakeplate);
return fakeplate;
};
render(document.body, html(
fakeplates.get(htmlContent) || setplate(htmlContent)
));
if you have static strings with interpolated values and you want to use these as arguments for template literals tag functions, check tag-params out.
Get it, thanks a lot!
Good day, Andrea! It's not working for uland ${{html: htmlContent}} ? https://codepen.io/alexzhav/pen/RwrZPPw