You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the documentation of the template engine, you can find a section about values. Because of different reasons expression inside of the element resolves to textContent. If it is the only one expression inside of the element, element.textContent = ... is used, or if it is a concatenation of expression, the engine creates text nodes. Although, you can pass HTML by using innerHTML property of the element, like this:
// Use it with caution, it might open XSS attackhtml`<divinnerHTML="${htmlCode}"></div>`;
In your example, instead of passing value inside of the <article> element, you should use it when your data resolve in extract function:
Because your data is async, you can't pass it directly in your main template. The difference is that <article> element will be rendered when the component receives data, but this is the only way to pass raw html to elements. Still, please be careful, it might open XSS attack.
hi! amazing lib that is hybrids.
I'm struggling with the tag literals to insert a
<mark>
tag in some places:Not exactly sure why, but the
<mark>
markup is displayed as is.Any idea how I could solve this problem?
Thanks!
The text was updated successfully, but these errors were encountered: