Use replace-with instead of appendChild

This commit is contained in:
Pieter Vander Vennet 2023-02-03 05:03:42 +01:00
parent 228ceb120d
commit a9d81f79b7

View file

@ -11,7 +11,7 @@
} else { } else {
html = construct.ConstructElement(); html = construct.ConstructElement();
} }
elem.appendChild(html) elem.replaceWith(html)
}); });
</script> </script>
<span bind:this={elem}></span> <span bind:this={elem}></span>