traverseElement function

void traverseElement(
  1. Element element,
  2. TraverseElementCallback callback
)

Implementation

void traverseElement(Element element, TraverseElementCallback callback) {
  callback(element);
  for (Element el in element.children) {
    traverseElement(el, callback);
  }
}