1. whenReady
  2. whenLoaded

Spludo also features a Bootstrap-Manager. A component, which takes some seconds to get ready for the first request, may register itself like this:

var bootstrap_token = bootstrap_manager.createMandatoryElement(
    'Pre caching of some elements.'
);

and free the token, as soon as it's done:

bootstrap_manager.finishMandatoryElement(bootstrap_token);

This works of course evented. The ConsoleApplication, ServerApplication or TestApplication waits for the BoostrapManager to emit the "end"-event, before it starts serving pages or running tests.

Comments