let fragment = new DocumentFragment();
fragment.childElementCount; // 0
let paragraph = document.createElement("p");
fragment.appendChild(paragraph);
fragment.childElementCount; // 1DocumentFragment: childElementCount property / notebook
DocumentFragment: childElementCount property
Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.