@nlo/lazy-image-loader
Advanced tools
Comparing version 0.0.1-alpha.39 to 0.0.1-alpha.41
@@ -17,3 +17,2 @@ declare global { | ||
constructor(appId: string); | ||
init(): void; | ||
private observeImages; | ||
@@ -20,0 +19,0 @@ private setImage; |
@@ -9,8 +9,6 @@ "use strict"; | ||
this.appId = appId; | ||
} | ||
LazyImageLoader.prototype.init = function () { | ||
this.observer = new window.IntersectionObserver(this.onEntry.bind(this), { rootMargin: '100px 0px' }); | ||
this.observeImages(document.querySelectorAll(this.images)); | ||
this.observeDomChanges(); | ||
}; | ||
} | ||
LazyImageLoader.prototype.observeImages = function (images) { | ||
@@ -98,5 +96,5 @@ var _this = this; | ||
var mutationObserver = new MutationObserver(callback); | ||
var portalSiteEl = document.getElementById(this.appId); | ||
if (portalSiteEl) { | ||
mutationObserver.observe(portalSiteEl, { | ||
var siteEl = document.getElementById(this.appId); | ||
if (siteEl) { | ||
mutationObserver.observe(siteEl, { | ||
attributes: false, | ||
@@ -103,0 +101,0 @@ childList: true, |
{ | ||
"name": "@nlo/lazy-image-loader", | ||
"version": "0.0.1-alpha.39+1b33cfd", | ||
"version": "0.0.1-alpha.41+c0f3c31", | ||
"description": "", | ||
@@ -23,3 +23,3 @@ "main": "dist/index.js", | ||
}, | ||
"gitHead": "1b33cfde301dce290ed5588e546b74e8774d5f17" | ||
"gitHead": "c0f3c31faf11b1020c214ca75f57414fa87bf8e8" | ||
} |
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
5629
137