src/adapt.js
function getAncestor (node, root, validate) {
  while (node.parent) {
    node = node.parent
    if (validate(node)) {
      return node
    }
    if (node === root) {
      break
    }
  }
  return null
}
function getAncestor (node, root, validate) {
  while (node.parent) {
    node = node.parent
    if (validate(node)) {
      return node
    }
    if (node === root) {
      break
    }
  }
  return null
}
function getAncestor ( node , root , validate ) { while ( node . parent ) { node = node . parent if ( validate ( node ) ) { return node } if ( node === root ) { break } } return null }
Bubble up from bottom to top

@param  {HTMLELement} node     - [description]
@param  {HTMLELement} root     - [description]
@param  {Function}    validate - [description]
@return {HTMLELement}          - [description]
Bubble up from bottom to top