function renderWithParse5(dom) {
    /*
     * `dom-serializer` passes over the special "root" node and renders the
     * node's children in its place. To mimic this behavior with `parse5`, an
     * equivalent operation must be applied to the input array.
     */
    const nodes = 'length' in dom ? dom : [dom];
    for (let index = 0; index < nodes.length; index += 1) {
        const node = nodes[index];
        if (isDocument(node)) {
            Array.prototype.splice.call(nodes, index, 1, ...node.children);
        }
    }
    let result = '';
    for (let index = 0; index < nodes.length; index += 1) {
        const node = nodes[index];
        result += serializeOuter(node, renderOpts);
    }
    return result;
}
/**
 * Renders the given DOM tree with `parse5` and returns the result as a string.
 *
 * @param dom - The DOM tree to render.
 * @returns The rendered document.
 */
Renders the given DOM tree with `parse5` and returns the result as a string.
@param dom - The DOM tree to render.
@returns The rendered document.
Renders the given DOM tree with ` parse5 ` and returns the result as a string . @param dom - The DOM tree to render . @returns The rendered document .
function renderWithParse5(dom) {
    const nodes = 'length' in dom ? dom : [dom];
    for (let index = 0; index < nodes.length; index += 1) {
        const node = nodes[index];
        if (isDocument(node)) {
            Array.prototype.splice.call(nodes, index, 1, ...node.children);
        }
    }
    let result = '';
    for (let index = 0; index < nodes.length; index += 1) {
        const node = nodes[index];
        result += serializeOuter(node, renderOpts);
    }
    return result;
}
function renderWithParse5 ( dom ) { const nodes = 'length' in dom ? dom : [ dom ] ; for ( let index = 0 ; index < nodes . length ; index += 1 ) { const node = nodes [ index ] ; if ( isDocument ( node ) ) { Array . prototype . splice . call ( nodes , index , 1 , ... node . children ) ; } } let result = '' ; for ( let index = 0 ; index < nodes . length ; index += 1 ) { const node = nodes [ index ] ; result += serializeOuter ( node , renderOpts ) ; } return result ; }
Renders the given DOM tree with `parse5` and returns the result as a string.
Renders the given DOM tree with ` parse5 ` and returns the result as a string .
/*
     * `dom-serializer` passes over the special "root" node and renders the
     * node's children in its place. To mimic this behavior with `parse5`, an
     * equivalent operation must be applied to the input array.
     */