Releases: nicross/Lazily
v1.0.2: Loading attribute hotfix
This release addresses an issue caused by a recent change in browser behavior.
Previously LazilyLoaderPlugin
would use a MutationObserver
to set loading=lazy
on <img>
elements in supported browsers. This assumed they would respond to the added loading
attribute rather than begin loading their contents. Currently this strategy no longer works reliably. It's likely that browsers now pre-emptively download resources before the MutationObserver
even executes.
LazilyLoaderPlugin
now uses an attribute-swapping technique to cancel the image load before setting loading=lazy
. For maximum compatibility it performs the swap-back at the next execution loop via setTimeout()
. It's unclear to me how this affects performance on extremely asset-heavy pages. In a later release I'd like to improve this with a queue and a debouncing function.
v1.0.2 changes
Lazily
: Prevent exceptions when calling API methods in unsupported browsersLazilyLoaderPlugin
: Fix nativeloading=lazy
fallback in supporting browsers
v1.0.1: Text node hotfix
This release fixes exceptions thrown when Lazily
attempts to observe and unobserve intersections for text nodes.
v1.0.0
I completely forgot about this project. Given that I'm using it in production in a few places, I figured it should receive a formal release.
v1.0.0 changes
- Fixed
LazilyLoaderPlugin::forceLoad()
- Disabled default reveal animations on print
- Updated development dependencies
v1.0.0-rc.1
This release includes all MVP features working in Chrome 77. This is marked as pre-release because they're untested in other target browsers. A full release is warranted once everything is more rigorously reviewed.