UNPKG

30.4 kBMarkdownView Raw
1# CHANGELOG
2
3## Version 19
4
5#### 19.1.3
6
7- File `CHANGELOG.md` is now included in the package and installed along with it
8- Updated Babel, Rollup and Playwright to the latest versions
9
10#### 19.1.2
11
12- Modernized code and smaller file bundles, everything is now shipped as in the ES2015 format.
13
14#### 19.1.1
15
16- Removed code to support image-set on legacy versions of Chromium browsers
17- Added coverage with 2 more demos for images with single src and a placeholder image
18
19#### 19.1.0
20
21- Added end to end tests to expand test coverage to more use cases and cross browser
22
23#### 19.0.5
24
25- Removed `.eslintrc.json`, `LICENSE`, `CHANGELOG.md`, `CODE_OF_CONDUCT.md`, `README.md`, `package.json` from the package files, as they didn't have any impact on [code quality](https://docs.npmjs.com/searching-for-and-choosing-packages-to-download#quality).
26
27#### 19.0.4
28
29- Removed Babel plugin to polyfill `Object.assign()`, as suggested in #611.
30
31#### 19.0.3
32
33- Files `.eslintrc.json`, `LICENSE`, `CHANGELOG.md`, `CODE_OF_CONDUCT.md`, `README.md`, `package.json` are now included in the package
34
35#### 19.0.1
36
37- Restored compatibility for bundlers that used this module, see #609
38
39#### 19.0.0
40
41- Rollup setup enhancement
42 - Refactored the Rollup setup to improve performance and maintainability.
43 - Switched to ES6 module format for better compatibility and readability.
44 - Enabled tree shaking and module preservation to optimize the build output.
45- Added [ESM demo](demos/esm.html) to showcase the functionality of the esm module.
46- Updated various dependencies to their latest versions for better compatibility and security
47- Removed AMD module from the `/dist` folder, as it's been unused since version 11
48- Removed AMD-related demos
49
50## Version 18
51
52#### 18.0.0
53
54- **Dropped support for Internet Explorer 11**
55- Modernized code
56- Smaller file
57
58## Version 17
59
60#### 17.9.0
61
62- Allowing to pass empty string (`""`) as value for class options (`class_loading`, `class_applied`, `class_loaded`, `class_error`, `class_entered`, `class_exited`) so that no DOM mutation will happen if not necessary. This is a potential performance improvement. Suggested in [#605](https://github.com/verlok/vanilla-lazyload/issues/605).
63
64#### 17.8.8
65
66- Fixed dependency issues detected by `npm audit`
67
68#### 17.8.5
69
70- Improved callbacks check by introducing type check (must be `function`)
71
72#### 17.8.4
73
74- Updated link to demos in the documentation.
75
76#### 17.8.3
77
78- Fixed `callback_error` in background images demos, like suggested in #573. Thanks to @Soul244.
79
80#### 17.8.2
81
82- Fixed a bug which occurred if the network connection went off and on again after a LazyLoad instance was destroyed
83
84#### 17.8.1
85
86- Updated Typescript typings
87
88#### 17.8.0
89
90- Added the ability to lazyload background images with CSS `image-set()` via `data-bg-set`.
91
92#### 17.7.0
93
94- Added the new option `restore_on_error` to restore original attributes on error.
95
96#### 17.6.1
97
98- Removed nasty "debugger" from code (sorry about that rookie mistake!)
99
100#### 17.6.0
101
102- Added ability to lazily load the `<object>` tag, as requested in #177. Useful to lazily load animated SVGs.
103
104#### 17.5.1
105
106- Updated Typescript typings
107
108#### 17.5.0
109
110- Added the ability to restore DOM to its original state through the `restoreAll()` method.
111- Destroy demo became [restore and destroy demo](demos/restore_destroy.html)
112
113#### 17.4.0
114
115- Adding native lazy loading for videos, as discussed in #527. Thanks to @saschaeggi.
116- Updated the `native_lazyload_conditional.html` demo with the new best practice for cross browser native lazy loading.
117
118#### 17.3.2
119
120- Fixes double trigger of `callback_load` after a watched image was loaded using the static `load()` method (#526). Thanks to @nick-vincent.
121
122#### 17.3.1
123
124- Removed `caniuse-lite` from dependencies. Fixes #505. Thanks to @ar53n.
125
126#### 17.3.0
127
128- Added `class_entered` and `class_exited` options to apply a class when an element entered and/or exited the viewport
129
130#### 17.2.0
131
132- Rolling back the "`data` attribute cleanup" feature that was released on 16.1.0 and was causing issues like [#484](https://github.com/verlok/vanilla-lazyload/issues/484) when more than one instance of LazyLoad were working on the same elements of the page - the script is also 500 bytes lighter now
133
134#### 17.1.3
135
136- Added missing types (#480), thanks to @ar53n (#482)
137
138#### 17.1.2
139
140- Fixed TypeScript typings (#475), thanks to @ar53n (#477)
141
142#### 17.1.1
143
144- Fixing npm audit vulnerabilities
145
146#### 17.1.0
147
148- Unobserve all elements on `loadAll()` call. It's better for performance, and it solves #469.
149- Added some hidden images in the `load_all.html` demo
150
151#### 17.0.1
152
153- Bug fix: `callback_exit()` was not being called on non-image elements (#468).
154
155#### 17.0.0
156
157- The `elements_selector` option now defaults to `.lazy` (was `img`)
158- The `cancel_on_exit` option now defaults to `true` (was `false`)
159
160See [UPGRADE.md](UPGRADE.md) to understand **if** you are impacted by any breaking change and **how** to upgrade from previous versions.
161
162---
163
164**Love this project? 😍 [Buy me a coffee!](https://ko-fi.com/verlok)**
165
166---
167
168## Version 16
169
170#### 16.1.0
171
172Improved speed, cleaning DOM, better working destroy, and also fixed 2 bugs.
173
174- Cleaning up `data` attributes from the DOM when finished using them (mainly when elements have finished loading)
175- Improved `destroy` method, which now also removes lazyload's additions to the DOM elements
176- Video elements are now only listening to the `loadeddata` event, no longer to `load`
177- Removed constants containing strings. I thought it would produced shorter minified code, but discovered that terser expands them to strings.
178- Bugfix: when lazily loading videos, the error `_poster_ is undefined` was thrown
179- Bugfix: when selecting native lazy loading, the `loading` class was added without knowing whether or not the loading had started
180
181#### 16.0.0
182
183Functional changes:
184
185- Removed call to deprecated `callback_reveal`
186- Removed deprecated instance `load()` method in favor of the static `LazyLoad.load()` method
187- Replaced `auto_unobserve` with `unobserve_completed`, still defaulting to `true`
188- Introduced a new `unobserve_entered` option (useful to execute lazy functions once)
189- Created a demo called `lazy_functions.html` to show how to execute functions as elements enter the viewport
190- Wrote a new recipe to facilitate the lazy execution of scripts/functions
191- Renamed instance method `resetElementStatus()` to the static `LazyLoad.resetStatus()`
192- Removed the `load_delay` option since there's no more use for it
193- Removed the `load_delay` related demos
194
195See [UPGRADE.md](UPGRADE.md) to understand **if** you are impacted by any breaking change and **how** to upgrade from previous versions.
196
197Internal changes:
198
199- Simplified management of the `cancel_on_exit` with less increase/decrease of the `toLoadCount` property
200- Refactored counters functions in a new `lazyload.counters` file
201
202---
203
204**Love this project? 😍 [Buy me a coffee!](https://ko-fi.com/verlok)**
205
206---
207
208## Version 15
209
210#### 15.2.0
211
212OPTIMIZE FOR SLOW CONNECTIONS WITH `cancel_on_exit`
213
214Want to optimize speed for users who scroll down fast on a slow connection? Just set `cancel_on_exit: true` and LazyLoad will cancel the download of images exiting the viewport while still loading, eventually restoring the original attributes.
215
216- Introduced the new `cancel_on_exit` option.
217- Introduced the `callback_cancel` option, just in case you want to perform any additional action whenever a download gets canceled by `cancel_on_exit`.
218- Created a new demo named `cancel_on_exit.html` so you can try the new `cancel_on_exit` option live.
219- Set `cancel_on_exit` to `true` in the following demos, so you can test how it behaves...
220 - `image_ph_inline.html`, with an inline SVG placeholder
221 - `image_ph_external.html`, with an external SVG placeholder
222 - `delay_test.html`, in conjuction with the `delay_load` option
223 - `fade_in.html`, with a beautiful fade-in effect.
224
225The `cancel_on_exit` option applies only to images so to the `img` (and `picture`) tags. It doesn't work for background images, `iframe`s nor `video`s.
226
227The `cancel_on_exit` option will probably default to `true` starting from the next major version, so give it a try! And please report your feedback in the comments of [#438](https://github.com/verlok/vanilla-lazyload/issues/438).
228
229API
230
231- Added the `resetElementStatus()` method for when you need to tell LazyLoad to consider an image (or other DOM element) again. This is particularly useful if you change the `data-src` attribute after the previous `data-src` was loaded). See the [API section](README.md#-api) in the README file for more information.
232
233FIX
234
235- The `callback_exit` callback was called several times (for every images out of the viewport) at instance creation or upon `update()` calls. Now the callback is properly called only when any element exits the viewport.
236
237INTERNALS
238
239- Improved script performance by reducing the number of event listeners used for loading elements.
240- Changed the values that the (internally used) `data-ll-status` attribute can take. Removed the status `"observed"` (it was useless) and introduced status `"delayed"`.
241
242#### 15.1.1
243
244Fixed a bug when loading lazy background images on HiDPI screens, `data-bg-hidpi` was mandatory, not it fallbacks to `data-bg`. #430
245
246#### 15.1.0
247
248Lazy background images just gained support for hiDPI ("retina") screens!
249Place your standard resolution images in the `data-bg` attribute and your hiDPI images in `data-bg-hidpi`.
250Same for `data-bg-multi` and `data-bg-multi-hidpi`.
251
252#### 15.0.0
253
254**Lazy background images gained loaded/error classes and callbacks! 🎉**
255
256**Breaking changes impacting lazy background images!** ⚠ See [UPGRADE.md](UPGRADE.md) to understand **if** you are impacted and **how** to upgrade from previous versions.
257
258- Lazy loading of **one background image** using the `data-bg` attribute, now manages the `load` and `error` events, so they are applied the classes defined in the `class_loading`/`class_loaded`/`class_error`, and the callbacks defined in `callback_loading`/`callback_loaded`/`callback_error`.
259- Lazy loading of **multiple background images** is still possible via the `data-bg-multi` attribute. In this case, the `load` and `error` events are not managed. The `class_applied` and `callback_applied` can be used to understand when the multiple background was applied to the element.
260- Updated background images demos:
261 - background-images.html -> single background images
262 - background-images-multi.html -> multiple background images
263- Added [UPGRADE.md](UPGRADE.md), a guide on how to upgrade from previous versions (from version 12 up)
264
265---
266
267**Love this project? 😍 [Buy me a coffee!](https://ko-fi.com/verlok)**
268
269---
270
271## Version 14
272
273#### 14.0.1
274
275Fixed error TS1036: Statements are not allowed in ambient contexts. Closes #427
276
277#### 14.0.0
278
279🎉 **Major refactoring and performance improvement!**
280🔍 File size stays tiny: only 2.07 KB gZipped
281
282**Settings**
283
284- `callback_loading` is called when an element started loading
285- `callback_reveal` is now **⚠ DEPRECATED, use `callback_loading` instead** (it's the same thing, it was just renamed). `callback_reveal` will be removed and will stop working in version 15.
286
287**Instance methods**
288
289- `update()` method now **also unobserves deleted elements**, instead of just looking for and observing new elements
290- `destroy()` **destroys better** than it did before, `delete`-ing properties instead of setting their values to `null`
291- `load()` method (as an instance method) is now **⚠ DEPRECATED, use the static method instead**. If you were using `aLazyLoadInstance.load(element)` you should change it to `LazyLoad.load(element, settings)`.
292
293**Static methods**
294
295- `load()` was added as a static method. Note that if you need to use custom settings, you need to pass them in the `settings` parameter.
296
297**Instance properties**
298
299- Added `toLoadCount`. It's the counter of the elements that haven't been lazyloaded yet.
300
301**DOM**
302
303- Removed the `data-was-processed` attribute, that was added to mark lazy DOM elements as "already managed". If you were manually handling that attribute to obtain some goal, this is a potentially breaking change. You should now refer to the `data-ll-status` instead.
304- Added the `data-ll-status` attribute, which is now used to mark the status of a lazy DOM element. The values it can take are: `observing` (not loaded yet), `loading` (loading started), `loaded` (load completed), `error` (an error has occured), `native` (similar to `observing`, but managed by native lazy loading).
305
306---
307
308**Love this project? 😍 [Buy me a coffee!](https://ko-fi.com/verlok)**
309
310---
311
312## Version 13
313
314#### 13.0.1
315
316- Fixed a JS error that could happen to IE11 users after going offline and back online
317- Minor refactoring for better readibility and lighter code (and files)!
318
319#### 13.0.0
320
321- Added the minified version of `dist/lazyload.esm.js` as `dist/lazyload.esm.min.js`, so now you can effortlessly use it with an ES module `import` statement when using `type="module"`
322- Reduced files weight even more! `dist/lazyload.iife.min.js` now weights only 2.03 KB GZipped
323- Removed the `callback_set` callback that was **deprecated** since version 11 in favour of `callback_reveal`
324- Removed sourcemaps (they were probably used only by the authors, but if anyone was actually needing them, we can bring them back)
325- Hidden the `_extends` function inside LazyLoad's scope (it was global before)
326- Updated build tooling: removed Gulp, now using Rollup & Babel only
327
328## Version 12
329
330#### 12.5.1
331
332Restored IE 11 compatibility, which was broken since 12.2.0. See #414.
333Thanks to @ninosaurus for reporting.
334
335#### 12.5.0
336
337The 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](demos/destroy.html).
338
339Thanks to @wzhscript and @eugene-stativka.
340
341#### 12.4.0
342
343Video `poster`s can now be loaded lazily, as requested in #365
344
345#### 12.3.0
346
347Callbacks now pass more arguments!
348
349`callback_enter`, `callback_exit` now pass:
350
3511. the DOM element that entered / exited the viewport
3522. the `IntersectionObserverEntry` that triggered the enter/exit event
3533. the LazyLoad instance
354
355`callback_load`, `callback_error`, `callback_reveal` now pass
356
3571. the DOM element that entered / exited the viewport
3582. the LazyLoad instance
359
360`callback_finish` now passes:
361
3621. the LazyLoad instance
363
364The README file has been updated accordingly.
365
366#### 12.2.0
367
368Released 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.
369
370#### 12.1.1
371
372Solved a bug with Internet Explorer 11 and the W3C polyfill, as reported in #383.
373
374#### 12.1.0
375
376- Updated npm dev dependencies
377- Added the new `image_ph_inline.html`, with an inline SVG placeholder
378- Added the new `image_ph_external.html`, with an external SVG placeholder
379
380#### 12.0.3
381
382Updated the IntersectionObserver polyfill to version 0.7.0
383
384#### 12.0.2
385
386Improved detection of browser support of IntersectionObserver, as suggested in #362. Thanks to @kaldonir
387
388#### 12.0.1
389
390Updated 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.
391
392#### 12.0.0
393
394- Reorganized code
395- Improved native lazy loading demos
396- Aligned console messages throughout all demos.
397
398#### 12.0.0-beta.0
399
400- Added the `use_native` option which enables _native lazy loading_ (where supported) with the `loading="lazy"` attribute. See #331
401- Added two demos:
402 - native_lazyload_conditional.html which you can use to test the `use_native` option
403 - native_lazyload.html which always uses native lazy loading (without JS) just to test how it works beyond the LazyLoad script
404- Refactored the constructor and the `update` method
405
406## Version 11
407
408#### 11.0.6
409
410Restored the `callback_set` callback as **deprecated**, in order to make the upgrade from v.10 easier.
411
412#### 11.0.5
413
414Fixed the `module` property of this package.json, which was pointing to a non-existing dist file.
415
416#### 11.0.4
417
418Fixed the `main` property of this package.json, which was pointing to a non-existing dist file.
419
420#### 11.0.3
421
422Rollback 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.
423
424#### 11.0.2
425
426Applied a patch to resolve #293 a [Chromium bug](https://bugs.chromium.org/p/chromium/issues/detail?id=910741#c13) already fixed in Chrome 72. Thanks to @dverbovyi for the analysis and the report.
427
428#### 11.0.1
429
430Squashed a nasty bug that occurred on IE 11 and Safari when the `IntersectionObserver` polyfill wasn't loaded before LazyLoad.
431
432#### 11.0.0
433
434- Changed bundle file name of ES Module from `lazyload.es2015.js` to `lazyload.esm.js`
435- Removed the `to_webp` option (see issue #288)
436- Ceased support and development of LazyLoad v.8 (see issue #306)
437 version. If you were using it, please update your code to use `callback_reveal` instead.
438- Private methods like `_setObserver`, `_onIntersection` etc. are now hidden from the outside.
439- Added the `auto_unobserve` boolean option, see API.
440- Bugfix: `loadAll()` didn't unobserve elements.
441- Updated to Jest 24, Babel 7, etc.
442- Fixed dev dependencies vulnerabilities
443- Updated callbacks. See below:
444
445Callbacks updated:
446
447- **Changed** `callback_enter`. This callback is now called whenever an element enters the viewport, even when `load_delay` is set. In previous versions, this callback was delayed until an element started loading if a `load_delay` was set. Note that this is a **possible breaking change**, which you can fix using `callback_reveal` instead.
448- **Renamed** `callback_loaded` is the new name of `callback_load`.
449- **Added** `callback_exit`. This callback is called whenever an element exits the viewport, even if a `load_delay` is set.
450- **Added** `callback_reveal`. This callback is called just after an element starts loading.
451- **Deprecated** `callback_set`. This callback still works\*, but will be removed in the next major
452
453\* it didn't work from versions 11.0.0 to 11.0.5, it still works from 11.0.6.
454
455## Version 10
456
457#### 10.20.1
458
459Fixed a bug for which LazyLoad didn't copy the `data-sizes` attribute value to `sizes` in `source` tags inside `picture`. See #307.
460
461#### 10.20.0
462
463Improved WebP detection to work correctly on Firefox too, see #298.
464
465Thanks to @ipernet for contributing.
466
467#### 10.19.1
468
469- Fixed build for those using React + SSR, see #287
470- TypeScript definitions clearified, see #283
471- Gulp updated to v.4.0.0 to make it work with node 10
472
473Thanks to @AlexCSR and @muturgan for contributing.
474
475#### 10.19.0
476
477- Added the ability to know when all images have been downloaded through the `callback_finish` callback.
478- Added the file `demos/print.html` to demo how to print lazy images.
479
480#### 10.18.0
481
482Added the ability to have multiple background images, through the new `data_bg` option.
483
484#### 10.17.0
485
486Added the ability to set different thresholds for the scrolling area, through the new `thresholds` option.
487
488#### 10.16.2
489
490**BUGFIX**: Class `loaded` was not applied to a loaded video (issue #239).
491
492#### 10.16.1
493
494**BUGFIX**: Autoplaying video not loaded correctly after entering the viewport (issue #240). Thanks to @maeligg.
495
496#### 10.16.0
497
498Added new option `load_delay` to skip loading when fast scrolling occurs, as requested in issues #235 and #166.
499Pass in a number of milliseconds, and each image will be loaded after it stayed inside that viewport for that time.
500
501#### 10.15.0
502
503- Refactorized code & improved script performance
504- **BUGFIX**: Fixed webpack import (issue #230) `TypeError: default is not a constructor`
505
506#### 10.14.0
507
508Now supporting WebP through dynamic extension rename if the user browser is compatible.
509
510#### 10.13.0
511
512- Shortened the RegEx for crawlers detection (shaved a few bytes)
513- Released LazyLoad in new module types! Enjoy the new flavours :)
514
515| Filename | Module Type | Advantages |
516| ---------------------- | ---------------------------------------------- | ------------------------------------------------------------------ |
517| `lazyload.min.js` | UMD (Universal Module Definition) | Works pretty much everywhere, even in common-js contexts |
518| `lazyload.iife.min.js` | IIFE (Immediately Invoked Function Expression) | Works as in-page `<script src="">`, ~0.5kb smaller minified |
519| `lazyload.amd.min.js` | AMD (Asynchronous Module Definition) | Works with the _require.js_ module loader, ~0.5kb smaller minified |
520| `lazyload.es2015.js` | ES Module type | Exports `LazyLoad` so you can import it in your project |
521
522#### 10.12.0
523
524SEO! Expanded SEO-friendliness to more crawlers, Bingbot included.
525
526#### 10.11.1
527
528**BUGFIX**: Fixed issue #225. Due to mistyped BOT detection, in version 10.11.0 all images were loaded as soon as `LazyLoad` was created.
529
530#### 10.11.0
531
532SEO! Version 10.x is now as SEO-friendly as version 8.x.
533
534#### 10.10.0
535
536Added a public `load` method to lazyload any element.
537
538#### 10.9.0
539
540Added the ability to lazily set the `sizes` attribute via a `data-sizes` attribute.
541See the [README](README.md) file for more information.
542
543#### 10.8.0
544
545Added a public `loadAll` method to loading all the images at once, as asked in #193.
546
547#### 10.7.0
548
549- Added support for the `<video>` HTML tag and descending `<source>` tags.
550 Now you can lazily load your videos too!
551- Created the `video.html` demo.
552
553#### 10.6.0
554
555- Added a demo with a popup layer and images injected after popup open, to help with #196.
556- Updated the `background_images` demo with a custom management of the loading class and the loaded event callback.
557
558#### 10.5.2
559
560Added a security check on lazy elements' parents.
561
562#### 10.5.1
563
564Just a refactoring over previous version.
565
566#### 10.5.0
567
568Added node support by merging pull request #188, "node-support" by @klarstrup.
569
570With 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.
571
572#### 10.4.2
573
574Fixed a bug for which sometimes images wouldn't reveal on Chrome 65 (see issue #165).
575
576#### 10.4.1
577
578Updated `dist` folder.
579
580#### 10.4.0
581
582Added the `callback_enter` callback, which is called whenevery any element managed by LazyLoad enters the viewport, as requested in #159. Thanks to @alvarotrigo.
583
584#### 10.3.6
585
586Fixed tests to match dataset revert made in 10.3 and 8.2 (oopsy).
587
588#### 10.3.5
589
590Fixed a bug that could occur on older versions of IE when trying to access an image's parent node.
591
592#### 10.3.4
593
594Fixed a CustomEvent bug which occurred on IE when using async object initialization.
595
596#### 10.3.3
597
598Fixed `supportsClassList` test to work even when the `document` object isn't yet there. Thanks to @Spone and his pull request #145.
599
600#### 10.3.1
601
602Introduced a workaround for an issue of Microsoft Edge documented [here](https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/12156111/)
603
604#### 10.3.0
605
606Restored support to IE9 and IE10, as requested in #118 and #132.
607
608#### 10.2.0
609
610To solve cases when you can't select the elements to load using a string, added the ability to pass a `NodeList` object...
611
612- as a second parameter in the constructor, after the regular option object, e.g. `var ll = new Lazyload({}, myNodeList)`
613- as a single parameter to the `update()` method, e.g. `ll.update(myNodeList)`
614
615#### 10.1.0
616
617To 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.
618
619#### 10.0.1
620
621Solved a problem with cdnjs.com: version 10.0.0 was pointing to 9.0.0.
622
623#### 10.0.0
624
625- Change in default options:
626 - default for `data_src` is now `src` (was `original`)
627 - default for `data_srcset` is now `srcset` (was `original-set`)
628
629## Version 9
630
631#### 9.0.1
632
633- Restored tests using Jest
634- Squashed a bug which didn't make images inside `picture` load correctly
635
636#### 9.0.0
637
638LazyLoad is now _faster_ thanks to the [Intersection Observer API](https://developer.mozilla.org/en-US/docs/Web/API/Intersection_Observer_API).
639
640**IMPORTANT!** Browser support changed. Find more information in the [README](README.md) file.
641
642## Version 8
643
644#### 8.17.0
645
646- Added the ability to know when all images have been downloaded through the `callback_finish` callback.
647- Added the file `demos/print.html` to demo how to print lazy images.
648
649#### 8.16.0
650
651Added the ability to have multiple background images, through the new `data_bg` option.
652
653#### 8.15.2
654
655**BUGFIX**: Class `loaded` was not applied to a loaded video (issue #239).
656
657#### 8.15.1
658
659**BUGFIX**: Autoplaying video not loaded correctly after entering the viewport (issue #240). Thanks to @maeligg.
660
661#### 8.15.0
662
663- Refactorized code & improved script performance
664- **BUGFIX**: Fixed webpack import (issue #230) `TypeError: default is not a constructor`
665
666#### 8.14.0
667
668Now supporting WebP through dynamic extension rename if the user browser is compatible.
669
670#### 8.13.0
671
672- Shortened the RegEx for crawlers detection (shaved a few bytes)
673- Released LazyLoad in new module types! Enjoy the new flavours :)
674
675| Filename | Module Type | Advantages |
676| ---------------------- | ---------------------------------------------- | ------------------------------------------------------------------ |
677| `lazyload.min.js` | UMD (Universal Module Definition) | Works pretty much everywhere, even in common-js contexts |
678| `lazyload.iife.min.js` | IIFE (Immediately Invoked Function Expression) | Works as in-page `<script src="">`, ~0.5kb smaller minified |
679| `lazyload.amd.min.js` | AMD (Asynchronous Module Definition) | Works with the _require.js_ module loader, ~0.5kb smaller minified |
680| `lazyload.es2015.js` | ES Module type | Exports `LazyLoad` so you can import it in your project |
681
682#### 8.12.0
683
684SEO! Expanded SEO-friendliness to more crawlers, Bingbot included.
685
686#### 8.11.0
687
688Added a public `load` method to lazyload any element.
689
690#### 8.10.0
691
692Added the ability to lazily set the `sizes` attribute via a `data-sizes` attribute.
693See the [README](README.md) file for more information.
694
695#### 8.9.0
696
697Added a public `loadAll` method to load all the images, as asked in #193.
698
699#### 8.8.0
700
701Added support for the `video` tag. Closes #209.
702Created the `video.html` demo.
703
704#### 8.7.1
705
706Added a security check on lazy elements' parents.
707
708#### 8.7.0
709
710Added node support by merging pull request #188, "node-support" by @klarstrup.
711
712With 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.
713
714#### 8.6.0
715
716Added the `callback_enter` callback, which is called whenevery any element managed by LazyLoad enters the viewport, as requested in #159. Thanks to @alvarotrigo.
717
718#### 8.5.2
719
720Fixed a bug that could occur on older versions of IE when trying to access an image's parent node.
721
722#### 8.5.1
723
724Fixed a CustomEvent bug which occured on IE when using async object initialization.
725
726#### 8.5.0
727
728- Change in default options, in order to be aligned with version 10
729 - default for `data_src` is now `src` (was `original`)
730 - default for `data_srcset` is now `srcset` (was `original-set`)
731
732#### 8.2.1
733
734Fixed `supportsClassList` test to work even when the `document` object isn't yet there. Thanks to @Spone and his #145.
735
736#### 8.2.0
737
738Restored support to IE9 and IE10, as requested in #118 and #132.
739
740#### 8.1.0
741
742Updated from grunt to gulp (run with gulp scripts).
743
744#### 8.0.3
745
746Added quotes in background image URLs, as suggested in #114 (thanks to @vseva).
747
748#### 8.0.2
749
750Fixed a bug that affected performance.
751
752#### 8.0.1
753
754Fixed reference to old names in demo files.
755
756#### 8.0.0
757
758- The main file to include is now **`dist/lazyload.min.js`** as you would expect, and no longer `dist/lazyload.transpiled.min.js`.
759- The non-transpiled version is now named lazyload.es2015.js
760
761## Version 7
762
763#### 7.2.0
764
765- Now using `element.dataset` to read data attributes
766- New readme! New website!
767
768Bug fixes:
769
770- Fixed #87
771
772**IMPORTANT!** Browser support changed. Find more information in the [README](README.md) file.
773
774#### 7.1.0
775
776- Refactored code now using more modules
777- Saving ~0.5 kb of transpiled code going back from ES2015 `class` to function's `prototype`
778
779#### 7.0.0
780
781Source code converted to ES2015 modules, bundled with [rollup.js](https://rollupjs.org/) and transpiled with [babel](https://babeljs.io/).
782
783## Version 6
784
785#### 6.3.x
786
787Added the class initial to all images (or iframes) inside the viewport at the moment of script initialization
788
789#### 6.2.x
790
791- Added the ability to load LazyLoad using an async script
792
793#### 6.1.x
794
795SEO improvements for lazily loaded images
796
797#### 6.0.x
798
799- Source code migrated to ES6 / ES2015
800- Serving both minified ES6 version and minified transpiled-to-ES5 version
801
802## Version 5
803
804- Exposed private functions for test coverage
805- Test coverage
806
807## Version 4
808
809- Lighter constructor
810- Performance improvements
811- Bugfix: null on background images
812- Removed code for legacy browsers - now supporting IE10+
813
814## Version 3
815
816- Added support to the picture tag
817- Removed the "show image only when fully loaded" mode
818 - Dumped the show_while_loading and placeholder options
819
820## Version 2
821
822- Added support to lazily load iframes and background images
823- Added error management callback and error class option
824- Performance improvements
825
826## Version 1
827
828- Added support to the srcset attribute for images
829- Added typescript typings + updated dist folder files
830- Performance improvements
831- Stable release of LazyLoad
832
833---
834
835_Want more detail? Take a look at the [release history](https://github.com/verlok/vanilla-lazyload/releases) on GitHub_!