function handleHierarchyEvent(rootSubject, gotLens) {
  setupAspectTimeout(rootSubject);
  const hierarchyLoadEvent = new CustomEvent('refocus.lens.hierarchyLoad', {
    detail: rootSubject,
  });

  /*
   * The order of events matters so only dispatch the hierarchyLoad event if
   * we received the lens response back.
   */
  if (gotLens) {
    LENS_DIV.dispatchEvent(hierarchyLoadEvent);
    return;
  }

  // lens is not received yet. Return hierarchyLoadEvent
  // to be dispatched from getLens
  return hierarchyLoadEvent;
}
/**
 * Setup the aspect timeout check, then dispatch
 * hierarchyLoad event if the lens is received.
 * Return the hierarchyLoadEvent otherwise
 *
 * @param {Object} rootSubject
 * @param {Boolean} gotLens
 * @returns {CustomEvent} if lens is received, return undefined,
 * else return hierarchyLoadEvent.
 */
Setup the aspect timeout check, then dispatch
hierarchyLoad event if the lens is received.
Return the hierarchyLoadEvent otherwise

@param {Object} rootSubject
@param {Boolean} gotLens
@returns {CustomEvent} if lens is received, return undefined,
else return hierarchyLoadEvent.
Setup the aspect timeout check then dispatch hierarchyLoad event if the lens is received . Return the hierarchyLoadEvent otherwise @param { Object } rootSubject @param { Boolean } gotLens @returns { CustomEvent } if lens is received return undefined else return hierarchyLoadEvent .
function handleHierarchyEvent(rootSubject, gotLens) {
  setupAspectTimeout(rootSubject);
  const hierarchyLoadEvent = new CustomEvent('refocus.lens.hierarchyLoad', {
    detail: rootSubject,
  });
  if (gotLens) {
    LENS_DIV.dispatchEvent(hierarchyLoadEvent);
    return;
  }
  return hierarchyLoadEvent;
}
function handleHierarchyEvent ( rootSubject , gotLens ) { setupAspectTimeout ( rootSubject ) ; const hierarchyLoadEvent = new CustomEvent ( 'refocus.lens.hierarchyLoad' , { detail : rootSubject , } ) ; if ( gotLens ) { LENS_DIV . dispatchEvent ( hierarchyLoadEvent ) ; return ; } return hierarchyLoadEvent ; }
Setup the aspect timeout check, then dispatch
 hierarchyLoad event if the lens is received.
Setup the aspect timeout check then dispatch hierarchyLoad event if the lens is received .
/*
   * The order of events matters so only dispatch the hierarchyLoad event if
   * we received the lens response back.
   */ // lens is not received yet. Return hierarchyLoadEvent // to be dispatched from getLens