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

modularload

Package Overview
Dependencies
Maintainers
1
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

modularload - npm Package Compare versions

Comparing version 1.1.0 to 1.1.1

26

dist/main.cjs.js

@@ -99,8 +99,8 @@ 'use strict';

window.addEventListener('click', function (e) {
return _this.checkClick(e);
}, false);
window.addEventListener('popstate', function (e) {
return _this.checkState(e);
}, false);
this.html.addEventListener('click', function (e) {
return _this.checkClick(e);
}, false);
this.loadEls(document);

@@ -111,13 +111,15 @@ }

value: function checkClick(e) {
e.preventDefault();
var target = e.target;
if (!e.ctrlKey && !e.metaKey) {
e.preventDefault();
var target = e.target;
while (target && target !== document) {
if (target.matches('a')) {
this.reset();
this.getClickOptions(target);
break;
while (target && target !== document) {
if (target.matches('a')) {
this.reset();
this.getClickOptions(target);
break;
}
target = target.parentNode;
}
target = target.parentNode;
}

@@ -124,0 +126,0 @@ }

@@ -97,8 +97,8 @@ function _classCallCheck(instance, Constructor) {

window.addEventListener('click', function (e) {
return _this.checkClick(e);
}, false);
window.addEventListener('popstate', function (e) {
return _this.checkState(e);
}, false);
this.html.addEventListener('click', function (e) {
return _this.checkClick(e);
}, false);
this.loadEls(document);

@@ -109,13 +109,15 @@ }

value: function checkClick(e) {
e.preventDefault();
var target = e.target;
if (!e.ctrlKey && !e.metaKey) {
e.preventDefault();
var target = e.target;
while (target && target !== document) {
if (target.matches('a')) {
this.reset();
this.getClickOptions(target);
break;
while (target && target !== document) {
if (target.matches('a')) {
this.reset();
this.getClickOptions(target);
break;
}
target = target.parentNode;
}
target = target.parentNode;
}

@@ -122,0 +124,0 @@ }

{
"name": "modularload",
"version": "1.1.0",
"version": "1.1.1",
"description": "Dead simple page transitions and lazy loading.",

@@ -5,0 +5,0 @@ "repository": "modularorg/modularload",

@@ -34,4 +34,4 @@ export default class {

init() {
window.addEventListener('click', (e) => this.checkClick(e), false);
window.addEventListener('popstate', (e) => this.checkState(e), false);
this.html.addEventListener('click', (e) => this.checkClick(e), false);

@@ -42,15 +42,17 @@ this.loadEls(document);

checkClick(e) {
e.preventDefault();
if (!e.ctrlKey && !e.metaKey) {
e.preventDefault();
let target = e.target;
let target = e.target;
while (target && target !== document) {
if (target.matches('a')) {
this.reset();
this.getClickOptions(target);
break;
}
while (target && target !== document) {
if (target.matches('a')) {
this.reset();
this.getClickOptions(target);
break;
}
target = target.parentNode;
};
target = target.parentNode;
};
}
}

@@ -57,0 +59,0 @@

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