src/other/utils.js
function findByNodeName(el, nodeName) {
  if (!el.prop) { // not a jQuery or jqLite object -> wrap it
    el = angular.element(el)
  }

  if (el.prop('nodeName') === nodeName.toUpperCase()) {
    return el
  }

  const c = el.children()
  for (let i = 0; c && i < c.length; i++) {
    const node = findByNodeName(c[i], nodeName)
    if (node) {
      return node
    }
  }
}
function findByNodeName(el, nodeName) {
  if (!el.prop) { // not a jQuery or jqLite object -> wrap it
    el = angular.element(el)
  }

  if (el.prop('nodeName') === nodeName.toUpperCase()) {
    return el
  }

  const c = el.children()
  for (let i = 0; c && i < c.length; i++) {
    const node = findByNodeName(c[i], nodeName)
    if (node) {
      return node
    }
  }
}
function findByNodeName ( el , nodeName ) { if ( ! el . prop ) { // not a jQuery or jqLite object -> wrap it el = angular . element ( el ) } if ( el . prop ( 'nodeName' ) === nodeName . toUpperCase ( ) ) { return el } const c = el . children ( ) for ( let i = 0 ; c && i < c . length ; i ++ ) { const node = findByNodeName ( c [ i ] , nodeName ) if ( node ) { return node } } }
recurse down a node tree to find a node with matching nodeName, for custom tags jQuery.find doesn't work in IE8
recurse down a node tree to find a node with matching nodeName for custom tags jQuery . find doesn t work in IE8