lazyload-promise
v1.1.0
Published
lazy loading images src and or srcset width promise magic Edit
Downloads
3
Maintainers
Readme
lazyload-promise
lazy loading images src and or srcset width promise magic
Install
$ npm install --save lazyload-promise
# or
$ yarn add lazyload-promise
Usage
import lazyload from 'lazyload-promise';
const nodeContainingImages = document.querySelector('#nodeContainingImages');
lazyload(nodeContainingImages)
.then(......)
// optional get load event of each image:
lazyload(nodeContainingImages, {onLoad:(e)=>{....}})
.then(......)
License
MIT © Sönke Kluth