document.replaceChildren();
document.children; // HTMLCollection []Document: replaceChildren() method / notebook
Document: replaceChildren() method
Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.