function getParentByTagName(node, tagname) {
  let parent;
  if (node === null || tagname === '') return;
  parent = node.parentNode;

  while (parent.nodeType === 1) {
    if (parent.tagName.toLowerCase() === tagname) {
      return parent;
    }

    parent = parent.parentNode;
  }
}
Filter all parents (ancestors) with tag name
@param {element} node
@param {string} tagname
@returns {element[]} parents
@memberof Core