Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

loading-attribute-polyfill

Package Overview
Dependencies
Maintainers
1
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

loading-attribute-polyfill - npm Package Compare versions

Comparing version 1.5.3 to 1.5.4

2

bower.json
{
"name": "loading-attribute-polyfill",
"description": "Fast and lightweight dependency-free vanilla JavaScript polyfill for native lazy loading / the awesome loading='lazy'-attribute.",
"version": "1.5.3",
"version": "1.5.4",
"homepage": "https://github.com/mfranzke/loading-attribute-polyfill",

@@ -6,0 +6,0 @@ "authors": [

@@ -9,2 +9,17 @@ # Changelog

## [1.5.4] - 2020-05-23
### Changed
- Updated webdriverio, husky, prettier and xo dependencies
- Replaced Greenkeeper by Snyk for vulnerabilities scanning
- Formatted code by prettier
- husky: moved the hook to the dedicated config file
- README: reordered the badges
### Fixed
- README: Position of Gitter badge
- npmignore: added necessary folder
## [1.5.3] - 2020-03-22

@@ -11,0 +26,0 @@

@@ -13,3 +13,3 @@ /*

(function(noscriptClass, rootMargin) {
(function (noscriptClass, rootMargin) {
'use strict';

@@ -56,3 +56,3 @@

} else {
rAFWrapper = function(func) {
rAFWrapper = function (func) {
func();

@@ -81,3 +81,3 @@ };

// Not using .dataset within those upfollowing lines of code for polyfill independent compatibility down to IE9
srcsetItems.forEach(function(item) {
srcsetItems.forEach(function (item) {
if (item.hasAttribute('data-lazy-srcset')) {

@@ -113,3 +113,3 @@ item.setAttribute('srcset', item.getAttribute('data-lazy-srcset'));

function onIntersection(entries, observer) {
entries.forEach(function(entry) {
entries.forEach(function (entry) {
// Mitigation for EDGE lacking support of .isIntersecting until v15, compare to e.g. https://github.com/w3c/IntersectionObserver/issues/211#issuecomment-309144669

@@ -139,3 +139,3 @@ if (entry.intersectionRatio === 0) {

mediaQueryList.addListener(function(mql) {
mediaQueryList.addListener(function (mql) {
if (mql.matches) {

@@ -149,3 +149,3 @@ document

)
.forEach(function(lazyItem) {
.forEach(function (lazyItem) {
restoreSource(lazyItem);

@@ -259,7 +259,7 @@ });

} else if ('addEventListener' in document) {
document.addEventListener('DOMContentLoaded', function() {
document.addEventListener('DOMContentLoaded', function () {
rAFWrapper(prepareElements);
});
} else {
document.attachEvent('onreadystatechange', function() {
document.attachEvent('onreadystatechange', function () {
if (document.readyState === 'complete') {

@@ -266,0 +266,0 @@ prepareElements();

{
"name": "loading-attribute-polyfill",
"version": "1.5.3",
"version": "1.5.4",
"description": "Fast and lightweight dependency-free vanilla JavaScript polyfill for native lazy loading / the awesome loading='lazy'-attribute.",

@@ -31,12 +31,12 @@ "main": "loading-attribute-polyfill.min.js",

"@commitlint/config-conventional": "^8.3.4",
"@wdio/cli": "^5.22.3",
"@wdio/dot-reporter": "^5.18.6",
"@wdio/local-runner": "^5.22.3",
"@wdio/mocha-framework": "^5.18.7",
"@wdio/sync": "^5.20.1",
"husky": "^4.2.3",
"prettier": "2.0.1",
"@wdio/cli": "^6.1.12",
"@wdio/dot-reporter": "^6.1.9",
"@wdio/local-runner": "^6.1.12",
"@wdio/mocha-framework": "^6.1.8",
"@wdio/sync": "^6.1.8",
"husky": "^4.2.5",
"prettier": "2.0.5",
"pretty-quick": "^2.0.1",
"webdriverio": "^5.22.3",
"xo": "^0.28.0"
"webdriverio": "^6.1.12",
"xo": "^0.30.0"
},

@@ -55,8 +55,3 @@ "scripts": {

}
},
"husky": {
"hooks": {
"pre-commit": "pretty-quick --staged"
}
}
}

@@ -7,9 +7,10 @@ # loading="lazy" attribute polyfill

[![jsDelivr CDN downloads](https://data.jsdelivr.com/v1/package/npm/loading-attribute-polyfill/badge "Count of total downloads – jsDelivr")](https://www.jsdelivr.com/package/npm/loading-attribute-polyfill "loading-attribute polyfill – on jsDelivr")
[![loading-attribute-polyfill on Npmjs](https://img.shields.io/npm/v/loading-attribute-polyfill.svg?color=rgb%28237%2C%2028%2C%2036%29 "npm version")](https://npmjs.com/package/loading-attribute-polyfill 'loading="lazy"-attribute polyfill – on NPM')
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/16c763924903400ca82cfed618a82a6e)](https://app.codacy.com/app/mfranzke_2/loading-attribute-polyfill?utm_source=github.com&utm_medium=referral&utm_content=mfranzke/loading-attribute-polyfill&utm_campaign=Badge_Grade_Dashboard)
[![Greenkeeper badge](https://badges.greenkeeper.io/mfranzke/loading-attribute-polyfill.svg)](https://greenkeeper.io/)
[![Known Vulnerabilities](https://snyk.io/test/github/mfranzke/loading-attribute-polyfill/badge.svg?targetFile=package.json)](https://snyk.io/test/github/mfranzke/loading-attribute-polyfill?targetFile=package.json)
[![dependencies Status](https://david-dm.org/mfranzke/loading-attribute-polyfill/status.svg "Count of dependencies")](https://david-dm.org/mfranzke/loading-attribute-polyfill "loading-attribute polyfill – on david-dm")
[![loading-attribute-polyfill on Npmjs](https://img.shields.io/npm/v/loading-attribute-polyfill.svg?color=rgb%28237%2C%2028%2C%2036%29 "npm version")](https://npmjs.com/package/loading-attribute-polyfill 'loading="lazy"-attribute polyfill – on NPM')
[![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettier)
[![XO code style](https://img.shields.io/badge/code_style-XO-5ed9c7.svg)](https://github.com/xojs/xo)
[![Conventional Commits](https://img.shields.io/badge/Conventional%20Commits-1.0.0-yellow.svg)](https://conventionalcommits.org)
[![Join the chat at https://gitter.im/loading-attribute-polyfill/community](https://badges.gitter.im/loading-attribute-polyfill/community.svg)](https://gitter.im/loading-attribute-polyfill/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

@@ -178,3 +179,3 @@ Fast and lightweight vanilla JavaScript polyfill for native lazy loading, meaning the behaviour to load elements right before they enter the viewport. Provides graceful degradation, and is - not just thatfor - SEO friendly. Handles images with `srcset` and within `picture`, as well as `iframe` elements. `loading="lazy"` will be a huge improvement for todays web performance challenges, so use and polyfill it today!

[![CrossBrowserTesting](https://crossbrowsertesting.com/blog/wp-content/uploads/2017/09/cbt-wp-logo.png "CrossBrowserTesting")](https://crossbrowsertesting.com) [![Join the chat at https://gitter.im/loading-attribute-polyfill/community](https://badges.gitter.im/loading-attribute-polyfill/community.svg)](https://gitter.im/loading-attribute-polyfill/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[![CrossBrowserTesting](https://crossbrowsertesting.com/blog/wp-content/uploads/2017/09/cbt-wp-logo.png "CrossBrowserTesting")](https://crossbrowsertesting.com)

@@ -181,0 +182,0 @@ ## Things to keep in mind

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc