• Correctly replace the specified nodes with corresponding values.

    This will materialize elements and values unless lazy is supplied as a truthy value.

    Parameters

    • elements: Iterable<Node>

      The nodes to replace.

    • values: Iterable<Node>

      The replacement nodes.

    • Optional lazy: boolean

    Returns [Iterable<Node>, Iterable<Node>]

    Example

    // Safely shuffle all the children of the first main element:
    import { update } from 'deleight/queryoperator';
    import { uItems } from 'deleight/generational';
    const main = document.querySelector('main');
    update(main.children, uItems(main.children))