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.0.5 to 1.0.6

17

dist/main.cjs.js

@@ -84,3 +84,6 @@ 'use strict';

this.html = document.documentElement;
this.href = window.location.href;
this.container = 'data-' + this.name + '-container';
this.subContainer = false;
this.prevTransition = null;
this.loadAttributes = ['src', 'srcset', 'style', 'href'];

@@ -187,6 +190,20 @@ this.classContainer = this.html;

this.classContainer = this.oldContainer.parentNode;
if (!this.subContainer) {
history.replaceState(this.transition, null, this.href);
}
this.subContainer = true;
} else {
this.prevTransition = this.transition;
this.oldContainer = document.querySelector(container);
if (this.subContainer) {
history.replaceState(this.prevTransition, null, this.href);
}
this.subContainer = false;
}
this.href = href;
this.oldContainer.classList.add('is-old');

@@ -193,0 +210,0 @@ this.setLoading();

@@ -82,3 +82,6 @@ function _classCallCheck(instance, Constructor) {

this.html = document.documentElement;
this.href = window.location.href;
this.container = 'data-' + this.name + '-container';
this.subContainer = false;
this.prevTransition = null;
this.loadAttributes = ['src', 'srcset', 'style', 'href'];

@@ -185,6 +188,20 @@ this.classContainer = this.html;

this.classContainer = this.oldContainer.parentNode;
if (!this.subContainer) {
history.replaceState(this.transition, null, this.href);
}
this.subContainer = true;
} else {
this.prevTransition = this.transition;
this.oldContainer = document.querySelector(container);
if (this.subContainer) {
history.replaceState(this.prevTransition, null, this.href);
}
this.subContainer = false;
}
this.href = href;
this.oldContainer.classList.add('is-old');

@@ -191,0 +208,0 @@ this.setLoading();

2

package.json
{
"name": "modularload",
"version": "1.0.5",
"version": "1.0.6",
"description": "Dead simple page transitions and lazy loading.",

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

@@ -20,3 +20,6 @@ export default class {

this.html = document.documentElement;
this.href = window.location.href;
this.container = 'data-' + this.name + '-container';
this.subContainer = false;
this.prevTransition = null;
this.loadAttributes = ['src', 'srcset', 'style', 'href'];

@@ -90,4 +93,4 @@

this.transition = history.state;
const href = window.location.href;
this.setOptions(href);

@@ -117,6 +120,21 @@ }

this.classContainer = this.oldContainer.parentNode;
if (!this.subContainer) {
history.replaceState(this.transition, null, this.href);
}
this.subContainer = true;
} else {
this.prevTransition = this.transition;
this.oldContainer = document.querySelector(container);
if (this.subContainer) {
history.replaceState(this.prevTransition, null, this.href);
}
this.subContainer = false;
}
this.href = href;
this.oldContainer.classList.add('is-old');

@@ -123,0 +141,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