Code that blocking

Hello! I have a html template from Themeforest and trying implement functions that I found on Codrops

The Codrops code is

// Preload images
const preloadImages = (selector = 'img') => {
    return new Promise((resolve) => {
        imagesLoaded(document.querySelectorAll(selector), {background: true}, resolve);
    });
};

export {
    preloadImages,
};

I discovered that this code blocking the template functions. I should be happy if somebody can guide me.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.