Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function applyFuncToDOMNodes (dom, func) {
func(dom)
const children = domutils.getChildren(dom)
if (children !== undefined) {
children.forEach((child) => {
applyFuncToDOMNodes(child, func)
})
}
}