DOM & HTML
Document Fragment
Construct lightweight, off-screen DOM subtree nodes for high-performance DOM manipulation.
Checking support...
Feature Not SupportedThis browser does not support the Document Fragment Web API feature. Try testing in a modern browser (such as Chrome, Edge, Safari, or Firefox).
Advertisement
Interactive Input Workspace
Ready for input
Web API Execution Output
Result output will be displayed here after processing...
Native JavaScript Code Example (Zero Libraries)
const fragment = document.createDocumentFragment();
const li = document.createElement('li');
fragment.appendChild(li);
document.querySelector('ul').appendChild(fragment);About the Document Fragment Web API
DocumentFragment acts as a minimal document object that has no parent, minimizing reflows when appended.
Specification:W3C & WHATWG Web API Standard
Sponsored Content