src/friendly-iframe-embed.js
/**
 * Returns the promise that will be resolved when all content elements
 * have been loaded in the initially visible set.
 * @param {!Node|!./service/ampdoc-impl.AmpDoc} context
 * @param {!Window} hostWin
 * @param {!./layout-rect.LayoutRectDef} rect
 * @return {!Promise}
 */
Returns the promise that will be resolved when all content elements
have been loaded in the initially visible set.
Returns the promise that will be resolved when all content elements have been loaded in the initially visible set .
function whenContentIniLoad(context, hostWin, rect) {
  return Services.resourcesForDoc(context)
      .getResourcesInRect(hostWin, rect)
      .then(resources => {
        const promises = [];
        resources.forEach(r => {
          if (!EXCLUDE_INI_LOAD.includes(r.element.tagName)) {
            promises.push(r.loadedOnce());
          }
        });
        return Promise.all(promises);
      });
}
function whenContentIniLoad ( context , hostWin , rect ) { return Services . resourcesForDoc ( context ) . getResourcesInRect ( hostWin , rect ) . then ( resources => { const promises = [ ] ; resources . forEach ( r => { if ( ! EXCLUDE_INI_LOAD . includes ( r . element . tagName ) ) { promises . push ( r . loadedOnce ( ) ) ; } } ) ; return Promise . all ( promises ) ; } ) ; }
Returns the promise that will be resolved when all content elements
 have been loaded in the initially visible set.
Returns the promise that will be resolved when all content elements have been loaded in the initially visible set .