First of all we should prepare viewport where dosbox will render the game. Look at line 8 we set the dosbox-container size to 640x400 px. This means that Digger will runs in screen with resolution 640x400 px.

At line 16 the js-dos-api.js was included. After processing this line, browser will download js-dos internals and prepare js-dos engine to work.