src/core/dom/layout/intersection.js
/**
 * Returns a promise that resolves with the intersection entry for the given element.
 *
 * If multiple measures for the same element occur very quickly, they will
 * dedupe to the same promise.
 *
 * @param {Element} el
 * @return {Promise<IntersectionObserverEntry>}
 */
Returns a promise that resolves with the intersection entry for the given element.
If multiple measures for the same element occur very quickly, they will
dedupe to the same promise.

@param {Element} el
@return {Promise}
Returns a promise that resolves with the intersection entry for the given element . If multiple measures for the same element occur very quickly they will dedupe to the same promise . @param { Element } el @return { Promise }
function measureIntersection(el) {
  let deferred = intersectionDeferreds?.get(el);
  if (!deferred) {
    const inOb = getInOb(getWin(el));
    devAssert(intersectionDeferreds);
    inOb.observe(el);
    deferred = new Deferred();
    intersectionDeferreds.set(el, deferred);
  }
  return deferred.promise;
}
function measureIntersection ( el ) { let deferred = intersectionDeferreds ?. get ( el ) ; if ( ! deferred ) { const inOb = getInOb ( getWin ( el ) ) ; devAssert ( intersectionDeferreds ) ; inOb . observe ( el ) ; deferred = new Deferred ( ) ; intersectionDeferreds . set ( el , deferred ) ; } return deferred . promise ; }
Returns a promise that resolves with the intersection entry for the given element.
Returns a promise that resolves with the intersection entry for the given element .