Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
_computeLocation(itemId, render) {
if (itemId && render) {
let item = store.findItem(itemId);
// ensure it loads fresh
return item.location + "?" + Math.floor(Date.now() / 1000);
}
}
locationChanged(newValue) {
handleIntersectionCallback(entries) {
for (let entry of entries) {
if (Number(entry.intersectionRatio).toFixed(2) >= this.visibleLimit) {
// now we care
if (this.itemId) {
let item = store.findItem(this.itemId);
this._a = item.location
.replace("pages/", "")
.replace("/index.html", "");
this.isVisible = true;
setTimeout(() => {
this.shadowRoot.querySelector("#a").click();
}, 25);
}
}
}
}
}