src/core/services/interimElement/interimElement.js
function findParent(element, options) {
          var parent = options.parent;

          // Search for parent at insertion time, if not specified
          if (angular.isFunction(parent)) {
            parent = parent(options.scope, element, options);
          } else if (angular.isString(parent)) {
            parent = angular.element($document[0].querySelector(parent));
          } else {
            parent = angular.element(parent);
          }

          // If parent querySelector/getter function fails, or it's just null,
          // find a default.
          if (!(parent || {}).length) {
            var el;
            if ($rootElement[0] && $rootElement[0].querySelector) {
              el = $rootElement[0].querySelector(':not(svg) > body');
            }
            if (!el) el = $rootElement[0];
            if (el.nodeName == '#comment') {
              el = $document[0].body;
            }
            return angular.element(el);
          }

          return parent;
        }
function findParent(element, options) {
          var parent = options.parent;

          // Search for parent at insertion time, if not specified
          if (angular.isFunction(parent)) {
            parent = parent(options.scope, element, options);
          } else if (angular.isString(parent)) {
            parent = angular.element($document[0].querySelector(parent));
          } else {
            parent = angular.element(parent);
          }

          // If parent querySelector/getter function fails, or it's just null,
          // find a default.
          if (!(parent || {}).length) {
            var el;
            if ($rootElement[0] && $rootElement[0].querySelector) {
              el = $rootElement[0].querySelector(':not(svg) > body');
            }
            if (!el) el = $rootElement[0];
            if (el.nodeName == '#comment') {
              el = $document[0].body;
            }
            return angular.element(el);
          }

          return parent;
        }
function findParent ( element , options ) { var parent = options . parent ; // Search for parent at insertion time, if not specified if ( angular . isFunction ( parent ) ) { parent = parent ( options . scope , element , options ) ; } else if ( angular . isString ( parent ) ) { parent = angular . element ( $document [ 0 ] . querySelector ( parent ) ) ; } else { parent = angular . element ( parent ) ; } // If parent querySelector/getter function fails, or it's just null, // find a default. if ( ! ( parent || { } ) . length ) { var el ; if ( $rootElement [ 0 ] && $rootElement [ 0 ] . querySelector ) { el = $rootElement [ 0 ] . querySelector ( ':not(svg) > body' ) ; } if ( ! el ) el = $rootElement [ 0 ] ; if ( el . nodeName == '#comment' ) { el = $document [ 0 ] . body ; } return angular . element ( el ) ; } return parent ; }
Search for parent at insertion time, if not specified
Search for parent at insertion time if not specified