diff --git a/src/polyfill.ts b/src/polyfill.ts index cc4891b4..b8b080f7 100644 --- a/src/polyfill.ts +++ b/src/polyfill.ts @@ -22,5 +22,12 @@ const polyfill = () => { configurable: true, }); } + + if (!Element.prototype.replaceChildren) { + Element.prototype.replaceChildren = function (...nodes) { + this.innerHTML = ""; + this.append(...nodes); + }; + } }; export default polyfill;