src/js/base/core/dom.js
function (node, pred) {
            node = node.parentNode;

            while (node) {
                if (nodeLength(node) !== 1) { break; }
                if (pred(node)) { return node; }
                if (isEditable(node)) { break; }

                node = node.parentNode;
            }
            return null;
        }
function (node, pred) {
            node = node.parentNode;

            while (node) {
                if (nodeLength(node) !== 1) { break; }
                if (pred(node)) { return node; }
                if (isEditable(node)) { break; }

                node = node.parentNode;
            }
            return null;
        }
function ( node , pred ) { node = node . parentNode ; while ( node ) { if ( nodeLength ( node ) !== 1 ) { break ; } if ( pred ( node ) ) { return node ; } if ( isEditable ( node ) ) { break ; } node = node . parentNode ; } return null ; }
find nearest ancestor only single child blood line and predicate hit

@param {Node} node
@param {Function} pred - predicate function
find nearest ancestor only single child blood line and predicate hit