function renderWithParse5(dom) {
    var _a;
    /*
     * `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.
     */
    var nodes = 'length' in dom ? dom : [dom];
    for (var index = 0; index < nodes.length; index += 1) {
        var node = nodes[index];
        if ((0, domhandler_1.isDocument)(node)) {
            (_a = Array.prototype.splice).call.apply(_a, __spreadArray([nodes, index, 1], node.children, false));
        }
    }
    var result = '';
    for (var index = 0; index < nodes.length; index += 1) {
        var node = nodes[index];
        result += (0, parse5_1.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) {
    var _a;
    var nodes = 'length' in dom ? dom : [dom];
    for (var index = 0; index < nodes.length; index += 1) {
        var node = nodes[index];
        if ((0, domhandler_1.isDocument)(node)) {
            (_a = Array.prototype.splice).call.apply(_a, __spreadArray([nodes, index, 1], node.children, false));
        }
    }
    var result = '';
    for (var index = 0; index < nodes.length; index += 1) {
        var node = nodes[index];
        result += (0, parse5_1.serializeOuter)(node, renderOpts);
    }
    return result;
}
function renderWithParse5 ( dom ) { var _a ; var nodes = 'length' in dom ? dom : [ dom ] ; for ( var index = 0 ; index < nodes . length ; index += 1 ) { var node = nodes [ index ] ; if ( ( 0 , domhandler_1 . isDocument ) ( node ) ) { ( _a = Array . prototype . splice ) . call . apply ( _a , __spreadArray ( [ nodes , index , 1 ] , node . children , false ) ) ; } } var result = '' ; for ( var index = 0 ; index < nodes . length ; index += 1 ) { var node = nodes [ index ] ; result += ( 0 , parse5_1 . 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.
     */