- Added a demo with a popup layer and images injected after popup open. Closes #196.
- Updated the
background_images
demo with a custom management of the loading class and the loaded event callback.
Added a security check on lazy elements' parents.
Just a refactoring over previous version.
Added node support by merging pull request #188, "node-support" by @klarstrup.
With these changes in place, simply importing vanilla-lazyload without using it won't crash Node by itself. This is important for isomorphic/universal/server rendered setups where the same code runs on both the server and the browser.
Fixed a bug for which sometimes images wouldn't reveal on Chrome 65 (see issue #165).
Updated dist
folder.
Added the callback_enter
callback, which is called whenevery any element managed by LazyLoad enters the viewport, as requested in #159. Thanks to @alvarotrigo.
Fixed tests to match dataset revert made in 10.3 and 8.2 (oopsy).
Fixed a bug that could occur on older versions of IE when trying to access an image's parent node.
Fixed a CustomEvent bug which occurred on IE when using async object initialization.
Fixed supportsClassList
test to work even when the document
object isn't yet there. Thanks to @Spone and his pull request #145.
Introduced a workaround for an issue of Microsoft Edge documented here
Restored support to IE9 and IE10, as requested in #118 and #132.
To solve cases when you can't select the elements to load using a string, added the ability to pass a NodeList
object...
- as a second parameter in the constructor, after the regular option object, e.g.
var ll = new Lazyload({}, myNodeList)
- as a single parameter to the
update()
method, e.g.ll.update(myNodeList)
To solve cases when you can't select the elements to load using a string, added the ability to pass a NodeList
object to the elements_selector
option, as suggested by @SassNinja in #130.
Solved a problem with cdnjs.com: version 10.0.0 was pointing to 9.0.0.
- Change in default options:
- default for
data_src
is nowsrc
(wasoriginal
) - default for
data_srcset
is nowsrcset
(wasoriginal-set
)
- default for
- Restored tests using Jest
- Squashed a bug which didn't make images inside
picture
load correctly
LazyLoad is now faster thanks to the Intersection Observer API.
IMPORTANT! Browser support changed. Find more information in the README file.
Added a security check on lazy elements' parents.
Added node support by merging pull request #188, "node-support" by @klarstrup.
With these changes in place, simply importing vanilla-lazyload without using it won't crash Node by itself. This is important for isomorphic/universal/server rendered setups where the same code runs on both the server and the browser.
Added the callback_enter callback, which is called whenevery any element managed by LazyLoad enters the viewport, as requested in #159. Thanks to @alvarotrigo.
Fixed a bug that could occur on older versions of IE when trying to access an image's parent node.
Fixed a CustomEvent bug which occured on IE when using async object initialization.
- Change in default options, in order to be aligned with version 10
- default for
data_src
is nowsrc
(wasoriginal
) - default for
data_srcset
is nowsrcset
(wasoriginal-set
)
- default for
Fixed supportsClassList
test to work even when the document
object isn't yet there. Thanks to @Spone and his #145.
Restored support to IE9 and IE10, as requested in #118 and #132.
Updated from grunt to gulp (run with gulp scripts).
Added quotes in background image URLs, as suggested in #114 (thanks to @vseva).
Fixed a bug that affected performance.
Fixed reference to old names in demo files.
- The main file to include is now
dist/lazyload.min.js
as you would expect, and no longerdist/lazyload.transpiled.min.js
. - The non-transpiled version is now named lazyload.es2015.js
- Now using
element.dataset
to read data attributes - New readme! New website!
Bug fixes:
- Fixed #87
IMPORTANT! Browser support changed. Find more information in the README file.
- Refactored code now using more modules
- Saving ~0.5 kb of transpiled code going back from ES2015
class
to function'sprototype
Source code converted to ES2015 modules, bundled with rollup.js and transpiled with babel.
Added the class initial to all images (or iframes) inside the viewport at the moment of script initialization
- Added the ability to load LazyLoad using an async script
SEO improvements for lazily loaded images
- Source code migrated to ES6 / ES2015
- Serving both minified ES6 version and minified transpiled-to-ES5 version
- Exposed private functions for test coverage
- Test coverage
- Lighter constructor
- Performance improvements
- Bugfix: null on background images
- Removed code for legacy browsers - now supporting IE10+
- Added support to the picture tag
- Removed the "show image only when fully loaded" mode
- Dumped the show_while_loading and placeholder options
- Added support to lazily load iframes and background images
- Added error management callback and error class option
- Performance improvements
- Added support to the srcset attribute for images
- Added typescript typings + updated dist folder files
- Performance improvements
- Stable release of LazyLoad
Want more detail? Take a look at the release history on GitHub!