Releases: verlok/vanilla-lazyload
Version 12.5
12.5.1
Restored IE 11 compatibility, which was broken since 12.2.0. See #414.
Thanks to @ninosaurus for reporting.
12.5.0
The once-private _loadingCount
property is now public and renamed to loadingCount
. This property contains the number of images that are currently downloading from the network, limitedly to the ones managed by an instance of LazyLoad. This is particularly useful to understand whether or not is safe to destroy an instance of LazyLoad. See implementation in the destroy demo.
Thanks to @wzhscript and @eugene-stativka.
Version 12.4
12.4.0
Video poster
s can now be loaded lazily, as requested in #365
Version 12.3
12.3.0
Callbacks now pass more arguments.
callback_enter
, callback_exit
now pass:
- the DOM element that entered / exited the viewport
- the
IntersectionObserverEntry
that triggered the enter/exit event - the LazyLoad instance
callback_load
, callback_error
, callback_reveal
now pass:
- the DOM element that entered / exited the viewport
- the LazyLoad instance
callback_finish
now passes:
- the LazyLoad instance
The README file has been updated accordingly.
Version 12.2
12.2.0
Released new feature "retry when back online". Now if your users lose the internet connection causing errors on images loading, this script tries and loads those images again when the connection is restored.
Version 12.1
12.1.1
Solved a bug with Internet Explorer 11 and the W3C polyfill, as reported in #383.
12.1.0
- Updated npm dev dependencies
- Added the new
image_ph_inline.html
, with an inline SVG placeholder - Added the new
image_ph_external.html
, with an external SVG placeholder
Version 12.0
12.0.3
Updated the IntersectionObserver polyfill to version 0.7.0.
12.0.2
Improved detection of browser support of IntersectionObserver, as suggested in #362. Thanks to @kaldonir
12.0.1
Updated CHANGELOG.md and README.md to mention the change of the option name callback_load
which is called callback_loaded
in versions 11.0.0 and above.
12.0.0
- Reorganized code
- Improved native lazy loading demos
- Aligned console messages throughout all demos.
12.0.0-beta.0
- Added the
use_native
option which enables native lazy loading (where supported) with theloading="lazy"
attribute. See #331 - Added two demos:
- native_lazyload_conditional.html which you can use to test the
use_native
option - native_lazyload.html which always uses native lazy loading (without JS) just to test how it works beyond the LazyLoad script
- native_lazyload_conditional.html which you can use to test the
- Refactored the constructor and the
update
method
Version 11.0
Version 11
11.0.6
Restored the callback_set
callback as deprecated, in order to make the upgrade from v.10 easier.
11.0.5
Fixed the module property of this package.json, which was pointing to a non-existing dist file.
11.0.4
Fixed the main
property of this package.json, which was pointing to a non-existing dist file.
11.0.3
Rollback of the patch applied in 11.0.2 since it gave strange results in some cases. See #293. Thanks to @davejamesmiller for the analysis and the report.
11.0.2
Applied a patch to resolve #293 a Chromium bug already fixed in Chrome 72. Thanks to @dverbovyi for the analysis and the report.
11.0.1
Squashed a nasty bug that occurred on IE 11 and Safari when the IntersectionObserver
polyfill wasn't loaded before LazyLoad.
11.0.0
- Changed bundle file name of ES Module from
lazyload.es2015.js
tolazyload.esm.js
- Removed the
to_webp
option (see issue #288) - Ceased support and development of LazyLoad v.8 (see issue #306)
- Callbacks renewal :: POSSIBLE BREAKING CHANGE
- Callback
callback_enter
has changed its meaning! It is now called whenever an element enters the viewport, even ifload_delay
is set - Callback
callback_exit
(new) is called whenever an element exits the viewport, even ifload_delay
is set - Callback
callback_reveal
(new) is called when an element is about to be revealed, and its attribute values were copied from thedata-
attributes to the actual ones. - Callback
callback_set
was removed. You can usecallback_reveal
instead.
- Callback
- Private methods like
_setObserver
,_onIntersection
etc. are now hidden and protected. - Added the
auto_unobserve
boolean option. - Bugfix:
loadAll()
didn't unobserve elements. - Updated to Jest 24, Babel 7, etc.
- Fixed dev dependencies vulnerabilities
Version 10.20
Version 10.19
10.19.0
- Added the ability to know when all images have been downloaded through the
callback_finish
callback. - Added the file
demos/print.html
to demo how to print lazy images.
10.19.1
Version 8.17
8.17.0
- Added the ability to know when all images have been downloaded through the
callback_finish
callback. - Added the file
demos/print.html
to demo how to print lazy images.