walkTree = (elem, cbFn) => {
  if (elem?.nodeType === 1) {
    cbFn(elem)
    let i = elem.childNodes.length
    while (i--) {
      walkTree(elem.childNodes.item(i), cbFn)
    }
  }
}
Walks the tree and executes the callback on each element in a top-down fashion.
@function module:utilities.walkTree
@param {Element} elem - DOM element to traverse
@param {module:utilities.TreeWalker} cbFn - Callback function to run on each element
@returns {void}