How to use the @deckdeckgo/utils.lazyLoadSelectedImages function in @deckdeckgo/utils

To help you get started, we’ve selected a few @deckdeckgo/utils examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github deckgo / deckdeckgo / webcomponents / slides / utils / src / utils / deckdeckgo-deck-utils.ts View on Github external
return new Promise(async (resolve) => {
        const images: HTMLElement[] = getAllImages(el, 'img');

        await lazyLoadSelectedImages(images);

        resolve();
    });
}
github deckgo / deckdeckgo / webcomponents / core / src / components / utils / deckdeckgo-deck-background-utils.tsx View on Github external
return new Promise(async (resolve) => {
      const allSlottedImages: NodeListOf = el.querySelectorAll('img[slot=\'background\']');
      const allShadowImages: NodeListOf = el.querySelectorAll('[slot=\'background\'] img');

      const images: HTMLElement[] = Array.from(allSlottedImages).concat(Array.from(allShadowImages));

      await lazyLoadSelectedImages(images);

      resolve();
    });
  }