Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

vanilla-lazyload

Package Overview
Dependencies
Maintainers
1
Versions
148
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vanilla-lazyload - npm Package Versions

1
1314

4.0.0

Diff

Changelog

Source

14.0.0

🎉 Major refactoring and performance improvement! 🔍 File size stays tiny: only 2.07 KB gZipped

Settings

  • callback_loading is called when an element started loading
  • callback_reveal is now ⚠ DEPRECATED, use callback_loading instead (it's the same thing, it was just renamed). callback_reveal will be removed and will stop working in version 15.

Instance methods

  • update() method now also unobserves deleted elements, instead of just looking for and observing new elements
  • destroy() destroys better than it did before, delete-ing properties instead of setting their values to null
  • load() method (as an instance method) is now ⚠ DEPRECATED, use the static method instead. If you were using aLazyLoadInstance.load(element) you should change it to LazyLoad.load(element, settings).

Static methods

  • load() was added as a static method. Note that if you need to use custom settings, you need to pass them in the settings parameter.

Instance properties

  • Added toLoadCount. It's the counter of the elements that haven't been lazyloaded yet.

DOM

  • Removed the data-was-processed attribute, that was added to mark lazy DOM elements as "already managed". If you were manually handling that attribute to obtain some goal, this is a potentially breaking change. You should now refer to the data-ll-status instead.
  • Added the data-ll-status attribute, which is now used to mark the status of a lazy DOM element. The values it can take are: observing (not loaded yet), loading (loading started), loaded (load completed), error (an error has occured), native (similar to observing, but managed by native lazy loading).

Love this project? 😍 Buy me a coffee!


Version 13

verlok
published 3.0.0 •

Changelog

Source

13.0.0

  • Added the minified version of dist/lazyload.esm.js as dist/lazyload.esm.min.js, so now you can effortlessly use it with an ES module import statement when using type="module"
  • Reduced files weight even more! dist/lazyload.iife.min.js now weights only 2.03 KB GZipped
  • Removed the callback_set callback that was deprecated since version 11 in favour of callback_reveal
  • Removed sourcemaps (they were probably used only by the authors, but if anyone was actually needing them, we can bring them back)
  • Hidden the _extends function inside LazyLoad's scope (it was global before)
  • Updated build tooling: removed Gulp, now using Rollup & Babel only

Version 12

verlok
published 2.1.2 •

verlok
published 2.1.1 •

Changelog

Source

12.1.1

Solved a bug with Internet Explorer 11 and the W3C polyfill, as reported in #383.

verlok
published 2.0.0 •

Changelog

Source

12.0.0

  • Reorganized code
  • Improved native lazy loading demos
  • Aligned console messages throughout all demos.
verlok
published 1.6.0 •

verlok
published 1.5.9 •

verlok
published 1.5.7 •

1
1314
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc