How to use the senna function in senna

To help you get started, we’ve selected a few senna examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github uyuni-project / uyuni / web / html / src / manager / shared / spa / spa-engine.js View on Github external
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;

senna

A blazing-fast Single Page Application engine

BSD-3-Clause
Latest version published 3 months ago

Package Health Score

84 / 100
Full package analysis