in src/helper/dom.ts [211:223]
clearChildren = function (this: ExtendedHTMLElement, removePersistent: boolean): ExtendedHTMLElement {
Array.from(this.childNodes).forEach((child: ExtendedHTMLElement | ChildNode) => {
if (
removePersistent ||
// eslint-disable-next-line @typescript-eslint/strict-boolean-expressions
!(child as ExtendedHTMLElement).builderObject ||
(child as ExtendedHTMLElement).builderObject.persistent !== true
) {
child.remove();
}
});
return this;
};