code: function renderView(router, view, template, params) {
    router.$viewport.css('opacity', 0);
  
    setTimeout(() => {
      router.$viewport.removeChildren();
      // TODO Remove all event listeners in $viewport, to avoid memory leaks.
      $body.scrollTop = 0;
      router.$viewport.html = template;
      Browser.resize();
      Browser.replaceSvgImports();
      router.$viewport.css({ opacity: 1, 'pointer-events': 'all' });
      document.title = router.$viewport.$('title').text;
      router.initialise(router.$viewport, params);
      if (view.enter) view.enter(router.$viewport, params);
      router.trigger('afterChange', {$viewport: router.$viewport});
    }, 350);
  }
docs: ----------------------------------------------------------------------------- Rendering and Navigation