anchor.diff:  
             // Every minute attempt to update the serviceWorker. If it does update
             // then the "controllerchange" event will fire.
  -          elemental2.dom.DomGlobal.setInterval( v -> registration.update(), 60000 );
  +          _serviceWorkerUpdateTask = zemeckis.Zemeckis.periodicTask( registration::update, 60000 );
             return null;
           }, error -> {
             elemental2.dom.DomGlobal.console.log( "ServiceWorker registration failed: ", error );
  
positive.code: <% end -%>
    }
  
    @javax.annotation.Nonnull
    protected final String getApplicationURL()
    {
  
negative.code:     elemental2.dom.DomGlobal.window.addEventListener( "beforeunload", e -> replicant.Replicant.context().deactivate(), true );
  <% if repository.keycloak? -%>
      updateReplicantToken();
      _updateReplicantTokenTask = zemeckis.Zemeckis.periodicTask( () -> getKeycloak().updateToken( 30, this::updateReplicantToken ), 5000 );
  <% end -%>
    }
  <% end -%>
  