MCPcopy Create free account
hub / github.com/codrops/ShapesSlideshow / preloadImages

Function preloadImages

src/js/utils.js:4–8  ·  view source on GitHub ↗
(selector = 'img')

Source from the content-addressed store, hash-verified

2
3// Preload images
4const preloadImages = (selector = 'img') => {
5 return new Promise((resolve) => {
6 imagesLoaded(document.querySelectorAll(selector), {background: true}, resolve);
7 });
8};
9
10export {
11 preloadImages

Callers 4

index.jsFile · 0.90
index.jsFile · 0.90
index.jsFile · 0.90
index.jsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected