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.
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.elementsarray. 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
mapElementChildrenormapElementChildrenWithStatefor transformations.