You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| Error | Test error loading behaviour when `restore_on_error` is `false`|[Code](demos/error_no_restore.html)|[Live](https://www.andreaverlicchi.eu/vanilla-lazyload/demos/error_no_restore.html)|
604
+
| Error | Test error loading behaviour when `restore_on_error` is `true`|[Code](demos/error_restore.html)|[Live](https://www.andreaverlicchi.eu/vanilla-lazyload/demos/error_restore.html)|
603
605
| Technique | Fade in images as they load |[Code](demos/fade_in.html)|[Live](https://www.andreaverlicchi.eu/vanilla-lazyload/demos/fade_in.html)|
@@ -709,6 +711,7 @@ Here's the list of the options.
709
711
|`callback_applied`| A callback function which is called whenever a multiple background element starts loading. Arguments: DOM element, lazyload instance. |`null`|`(el)=>{console.log("Applied", el)}`|
710
712
|`callback_finish`| A callback function which is called when there are no more elements to load _and_ all elements have been downloaded. Arguments: lazyload instance. |`null`|`()=>{console.log("Finish")}`|
711
713
|`use_native`| This boolean sets whether or not to use [native lazy loading](https://addyosmani.com/blog/lazy-loading/) to do [hybrid lazy loading](https://www.smashingmagazine.com/2019/05/hybrid-lazy-loading-progressive-migration-native/). On browsers that support it, LazyLoad will set the `loading="lazy"` attribute on images, iframes and videos, and delegate their loading to the browser. |`false`|`true`|
714
+
|`restore_on_error`| Tells LazyLoad if to restore the original values of `src`, `srcset` and `sizes` when a loading error occurs. |`false`|`true`|
0 commit comments