How to generate a preloadTemplate programmatically

Hello contributors.

I am using a custom loading splash using theia’s preloadTemplate.

Is it possible to start and end this loading splash at a specific moment I want?