The DocumentFragment.prepend()
method inserts a set of Node
objects or DOMString
objects before the first child of the document fragment. DOMString
objects are inserted as equivalent Text
nodes.
This method prepends a child to a DocumentFragment
. To prepend to an arbitrary element in the tree, see Element.prepend()
.