1.1.0 • Published 7 years ago

lazyload-promise v1.1.0

Weekly downloads
1
License
MIT
Repository
github
Last release
7 years ago

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