File Manager

Path: /home/liffinac1/domains/impactxtmtrading.com/private_html/vendor/livewire/livewire/js/util/

Viewing File: walk.js

// A little DOM-tree walker.
// (TreeWalker won't do because I need to conditionaly ignore sub-trees using the callback)
export function walk(root, callback) {
    if (callback(root) === false) return

    let node = root.firstElementChild

    while (node) {
        walk(node, callback)
        node = node.nextElementSibling
    }
}