UNPKG

vanilla-lazyload

Version:

LazyLoad is a lightweight (2.4 kB) and flexible script that speeds up your web application by deferring the loading of your below-the-fold images, videos and iframes to when they will enter the viewport. It's written in plain "vanilla" JavaScript, it leve

2 lines (1 loc) 270 B
const o=(o,t)=>{o&&(o.loadingCount+=t)},t=o=>{o&&(o.toLoadCount-=1)},n=(o,t)=>{o&&(o.toLoadCount=t)},a=o=>o.loadingCount>0,d=o=>o.toLoadCount>0;export{t as decreaseToLoadCount,d as haveElementsToLoad,a as isSomethingLoading,n as setToLoadCount,o as updateLoadingCount};