code: function findAncestor(node, matchFunction, bound){
      while (node && node !== bound)
      {
        if (matchFunction(node))
          break;
  
        node = node.parentNode;
      }
  
      return node || null;
    }
docs: Returns ancestor that matchFunction returns true for.
  @param {Node} node Start node for traversal.
  @param {function(node:Node):boolean} matchFunction Checking function.
  @param {Node=} bound Don't traversal after bound node.
  @return {Node} First ancestor node that pass matchFunction.