ZVON > References > DOM1 Reference

DocumentFragment (interface)

Type of the interface:   fundamental

Own properties:
attributes  -  none
methods  -  none

Inherited properties:
attributes  -  nodeName, nodeValue, nodeType, parentNode, childNodes, firstChild, lastChild, previousSibling, nextSibling, attributes, ownerDocument
methods  -  insertBefore, replaceChild, removeChild, appendChild, hasChildNodes, cloneNode

Description:
For some cases (extracting a portion of a document's tree, creating a new fragment of a document, inserting nodes as children of another node) it is desirable to have an object which can hold fragments of document. Document object itself is a little bit heavyweight for this, something lightweight that behaves like Node is much better. And exactly this is DocumentFragment. [When a DocumentFragment is inserted into a Document (or indeed any other Node that may take children) the children of the DocumentFragment and not the DocumentFragment itself are inserted into the Node.]