HTML5 - When does the loading of my game start and end?

I need to incude a javascript code when the loading of my HTML5 game starts and end. Where in my project should I insert it?

See Solar2D Documentation — Developer Guides | HTML5

Thank you @Scott_Harrison , but that documentation does’nt add nothing about my question

What are you trying to achieve? You can just insert code into the index.html of the “.html5” project

I’m trying to submit my last game to crazygames.com. Their documentation require this:

Game loading

We provide functions that enable us to track when and how long the loading of your game takes. The sdkGameLoadingStart() function has to be called whenever you start loading your game. The sdkGameLoadingStop() function has to be called the loading is complete and eventually the game play starts.

// Your game starts loading
crazysdk.sdkGameLoadingStart();
// Loading...
crazysdk.sdkGameLoadingStop();
// Next level's assets are loading now
crazysdk.sdkGameLoadingStart();
// Assets are loaded
crazysdk.sdkGameLoadingStop();

You could just add js code .sdkGameLoadingStart() in html code. And call .sdkGameLoadingStop() from main.lua via Lua<->JS bridge.

Good idea. Thank you!