Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
window.pageRenderers.spa.init = function init() {
const appInstance = new App();
appInstance.setLinkSelector("a.js-spa");
appInstance.setFormSelector("");
appInstance.addSurfaces(["left-menu-data", "ssm-box", "page-body"])
appInstance.addRoutes([{
path: /.*/,
handler: function (route, a, b) {
const screen = new HtmlScreen();
screen.setCacheable(false);
return screen;
}
}]);
appInstance.on('endNavigate', function(navigation) {
// workaround to redirect to the login page when there is no session:
// More info: https://github.com/liferay/senna.js/issues/302
const urlPath = appInstance.browserPathBeforeNavigate;