Skip to content

Virtual whiteboard for sketching hand-drawn like diagrams

fix: polyfill `Element.replaceChildren` (#7034)

David Luzar556175558a7f
diff --git a/src/polyfill.ts b/src/polyfill.ts
index cc4891b4de..b8b080f754 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;