HTML DOM Document createDocumentFragment()
HTML DOM Document createDocumentFragment() Method
The createDocumentFragment() method is used for creating offscreen node. It is used for building new document fragment that can be inserted into any document. Moreover, we can extract parts of a document, change, add, or delete some of the content, and insert it back into the document.
Syntax:-
Its syntax is:- document.createDocumentFragment()
Return:-
Its return is:- created DocumentFragment node