wdpr
    Preparing search index...
    • Walk all elements recursively in depth-first order, calling a callback for each.

      The callback is invoked for every element in the tree, including elements nested inside lists, tables, definition lists, tab views, and any element with a data.elements array. The callback is called before descending into children (pre-order traversal).

      This is a read-only traversal; the callback cannot modify the tree structure. Use mapElementChildren or mapElementChildrenWithState for transformations.

      Parameters

      • elements: Element[]

        Array of elements to traverse

      • callback: (element: Element) => void

        Function called for each element encountered

      Returns void