mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-04-14 16:40:58 -04:00
fix: polyfill Element.replaceChildren
(#7034)
This commit is contained in:
parent
4db73a7f95
commit
556175558a
1 changed files with 7 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue