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

@jack-henry/web-component-router

Package Overview
Dependencies
Maintainers
2
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@jack-henry/web-component-router - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

2

animated-routing-mixin.js

@@ -49,3 +49,3 @@ import RouteTreeNode from './lib/route-tree-node.js';

currentElement.classList.add(className);
return super.routeEnter(currentNode, nextNodeIfExists, routeId, context, next);
return super.routeEnter(currentNode, nextNodeIfExists, routeId, context);
}

@@ -52,0 +52,0 @@

{
"name": "@jack-henry/web-component-router",
"version": "1.0.0",
"version": "1.0.1",
"description": "Web Components Router",

@@ -5,0 +5,0 @@ "main": "router.js",

@@ -77,3 +77,5 @@ /**

/** @type {!Set<!function()>} */
this.routeChangeStartCallbacks_ = new Set();
/** @type {!Set<!function(!Error=)>} */
this.routeChangeCompleteCallbacks_ = new Set();

@@ -207,3 +209,3 @@ }

/** @param {!Function} callback */
/** @param {!function()} callback */
addRouteChangeStartCallback(callback) {

@@ -213,3 +215,3 @@ this.routeChangeStartCallbacks_.add(callback);

/** @param {!Function} callback */
/** @param {!function()} callback */
removeRouteChangeStartCallback(callback) {

@@ -219,3 +221,3 @@ this.routeChangeStartCallbacks_.delete(callback);

/** @param {!Function} callback */
/** @param {!function(!Error=)} callback */
addRouteChangeCompleteCallback(callback) {

@@ -225,3 +227,3 @@ this.routeChangeCompleteCallbacks_.add(callback);

/** @param {!Function} callback */
/** @param {!function(!Error=)} callback */
removeRouteChangeCompleteCallback(callback) {

@@ -367,6 +369,12 @@ this.routeChangeCompleteCallbacks_.delete(callback);

this.currentNodeId_ = routeTreeNode.getKey();
await routeTreeNode.activate(this.prevNodeId, context);
/** @type {!Error|undefined} */
let routeError;
try {
await routeTreeNode.activate(this.prevNodeId, context);
} catch (err) {
routeError = err;
}
next();
this.nextStateWasPopped = false;
this.routeChangeCompleteCallbacks_.forEach((cb) => cb());
this.routeChangeCompleteCallbacks_.forEach((cb) => cb(routeError));
}

@@ -373,0 +381,0 @@

@@ -16,5 +16,5 @@ import RouteTreeNode from './lib/route-tree-node.js';

* @param {!Context} context
* @param {function(boolean=)} next
* @return {!Promise<boolean|undefined>}
*/
routeEnter(currentNode, nextNodeIfExists, routeId, context, next) { }
async routeEnter(currentNode, nextNodeIfExists, routeId, context) { }

@@ -29,5 +29,5 @@ /**

* @param {!Context} context
* @param {function(boolean=)} next
* @return {!Promise<undefined>}
*/
routeExit(currentNode, nextNode, routeId, context, next) { }
async routeExit(currentNode, nextNode, routeId, context) { }
};

@@ -55,3 +55,3 @@

* @param {!Context} context
* @return {!Promise<undefined>}
* @return {!Promise<boolean|undefined>}
*/

@@ -58,0 +58,0 @@ async routeEnter(currentNode, nextNodeIfExists, routeId, context) {

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