fix(codegen): render template content safely
Co-Authored-By: Virgil <virgil@lethean.io>
This commit is contained in:
parent
4bbdb10080
commit
871b29582f
1 changed files with 1 additions and 1 deletions
|
|
@ -51,7 +51,7 @@ var wcTemplate = template.Must(template.New("wc").Parse(`class {{.ClassName}} ex
|
|||
}
|
||||
render(html) {
|
||||
const tpl = document.createElement("template");
|
||||
tpl.insertAdjacentHTML("afterbegin", html);
|
||||
tpl.innerHTML = html;
|
||||
this.#shadow.textContent = "";
|
||||
this.#shadow.appendChild(tpl.content.cloneNode(true));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue