vanilla-lazyload
Advanced tools
Comparing version 10.5.2 to 10.6.0
@@ -91,2 +91,6 @@ # CHANGELOG | ||
#### 8.7.1 | ||
Added a security check on lazy elements' parents. | ||
#### 8.7.0 | ||
@@ -93,0 +97,0 @@ |
@@ -19,5 +19,4 @@ var gulp = require("gulp"); | ||
.pipe(rollup({ | ||
format: "umd", | ||
moduleName: "LazyLoad", | ||
entry: "./src/lazyload.js" | ||
input: "./src/lazyload.js", | ||
output: { name: "LazyLoad", format: "umd" } | ||
})) | ||
@@ -24,0 +23,0 @@ .pipe(rename("lazyload.es2015.js")) |
{ | ||
"name": "vanilla-lazyload", | ||
"version": "10.5.2", | ||
"version": "10.6.0", | ||
"description": "A fast, lightweight script to load images as they enter the viewport. SEO friendly, it supports responsive images (both srcset + sizes and picture) and progressive JPEG", | ||
@@ -5,0 +5,0 @@ "main": "dist/lazyload.min.js", |
@@ -17,3 +17,3 @@ LazyLoad is a fast, lightweight and flexible script that _speeds up your web application_ by **loading images as they enter the viewport**. It's written in plain "vanilla" JavaScript, uses [Intersection Observers](https://developer.mozilla.org/en-US/docs/Web/API/Intersection_Observer_API), and supports [responsive images](https://alistapart.com/article/responsive-images-in-practice). It's also SEO-friendly and it has some other [notable features](#notable-features). | ||
```html | ||
<script src="https://cdnjs.cloudflare.com/ajax/libs/vanilla-lazyload/8.7.0/lazyload.min.js"></script> | ||
<script src="https://cdnjs.cloudflare.com/ajax/libs/vanilla-lazyload/8.7.1/lazyload.min.js"></script> | ||
``` | ||
@@ -38,3 +38,3 @@ | ||
var s = d.createElement("script"); s.async = true; | ||
var v = !("IntersectionObserver" in w) ? "8.7.0" : "10.5.2"; | ||
var v = !("IntersectionObserver" in w) ? "8.7.1" : "10.5.2"; | ||
s.src = "https://cdnjs.cloudflare.com/ajax/libs/vanilla-lazyload/" + v + "/lazyload.min.js"; | ||
@@ -55,6 +55,6 @@ w.lazyLoadOptions = {}; // Your options here. See "recipes" for more information about async. | ||
- **install it with npm** | ||
Recommended version `npm install vanilla-lazyload@8.7.0` | ||
Recommended version `npm install vanilla-lazyload@8.7.1` | ||
Latest version `npm install vanilla-lazyload` | ||
- **install it with bower** | ||
Recommended version `bower install vanilla-lazyload#8.7.0` | ||
Recommended version `bower install vanilla-lazyload#8.7.1` | ||
Latest version `bower install vanilla-lazyload` | ||
@@ -482,3 +482,3 @@ | ||
| `container` | The scrolling container, and the container of the elements in the `elements_selector` option. | `document` | | ||
| `elements_selector` | The string selector of the elements to load lazily, to be selected as descendants of the `container` object. | `"img"` | | ||
| `elements_selector` | The string selector of the elements to load lazily, to be selected as descendants of the `container` object. For multiple elements, you can add the css selectors for the same followed by a comma. E.g.: `'iframe, img, .container_class'`. This will lazy load images for iframe and img elements along with the images/background images under `'container_class'` | `"img"` | | ||
| `threshold` | The distance out of the viewport, expressed in pixel, before which to start loading the images | `300` | | ||
@@ -485,0 +485,0 @@ | `data_src` | The name of the data attribute containing the original image source, excluding the `"data-"` part. E.g. if your data attribute is named `"data-src"`, just pass `"src"` | `"src"` | |
Sorry, the diff of this file is not supported yet
908953
134
1003