utils

Methods

(inner) createDocumentFragmentFromString(html) → {DocumentFragment}

Source:
Creates `DocumentFragment` from given HTML string.
Parameters:
Name Type Description
html String HTML string.
Returns:
Proper `DocumentFragment`.
Type
DocumentFragment

(inner) getHTMLFromDocumentFragment(documentFragment) → {String}

Source:
Gets HTML from `DocumentFragment`.
Parameters:
Name Type Description
documentFragment DocumentFragment `DocumentFragment`.
Returns:
HTML string.
Type
String

(inner) removeAllChildren(element) → {undefined}

Source:
Remove all children from element.
Parameters:
Name Type Description
element HTMLElement | DocumentFragment HTML element with children to be deleted.
Returns:
Type
undefined

(inner) replaceElementWithChildren(element) → {undefined}

Source:
Replaces element with its children.
Parameters:
Name Type Description
element HTMLElement DOM element.
Returns:
Type
undefined