Skip to content
This repository has been archived by the owner on Dec 11, 2023. It is now read-only.

Releases: nicross/Lazily

v1.0.2: Loading attribute hotfix

21 Jan 01:01
Compare
Choose a tag to compare

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 browsers
  • LazilyLoaderPlugin: Fix native loading=lazy fallback in supporting browsers

v1.0.1: Text node hotfix

17 Jan 20:12
Compare
Choose a tag to compare

This release fixes exceptions thrown when Lazily attempts to observe and unobserve intersections for text nodes.

v1.0.0

16 Jan 21:03
Compare
Choose a tag to compare

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

18 Sep 04:43
Compare
Choose a tag to compare
v1.0.0-rc.1 Pre-release
Pre-release

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.