A fast, flexible, and small SEO-friendly lazy loader.
noPolyfill
option.postinstall
script will notify you of this on install from here on out.This is a small bugfix release:
MutationObserver
was not reloading images in some SPA scenarios.src
attributes before srcset
attributes, causing Safari to get the src
-referenced resource first. This could be side-stepped by specifying an attribute order of data-srcset
first, then data-src
. yall's data-
attribute flipping function was refactored to fix this.This release adds a couple new features and bugfixes.
Bugs fixed:
Image.decode()
. This feature was causing a fair bit of unpredictable behavior, so removing it was a reasonable step. It may be added back in later on if necessary.<video>
image placeholders brought in by poster
. This was proposed in #32 by @DanThePainter and @leeoniya.Bug fixes galore:
yall
function. (Thanks, @michielkouwenhoven!)data-
attributes on elements by using an attribute whitelist. (Thanks, @xanisu!)This is a rewrite of yall.js. Improvements/changes include:
<iframe>
elements can now be lazy loaded.requestIdleCallback
can be optionally used to lazy load elements while optimizing browser idle time.observeChanges
option.<img>
lazy loading use cases now benefit from async decoding using Image.decode()
.File an issue for any bugs you encounter. Testing was extensive, but bugs are always possible!
Happy lazy loading!
yall-1.2.0.min.js.zip
The title says it all! Check the docs or test
folder for the usage pattern on <video>
tags.
yall-1.1.2.min.js.zip Includes a fix for #13 from @anthonygore. Thank you, sir!
yall-1.1.1.min.js.zip Not really the initial release, but we have to start somewhere.