]> git.r.bdr.sh - rbdr/heart/blame - js/app.js
Add CI status to README
[rbdr/heart] / js / app.js
CommitLineData
910278aa
BB
1'use strict';
2
3// Sets up the application
4
5((window) => {
6
7 const internals = {};
8
9 internals.onLoad = () => {
10
11 const mainElement = window.document.getElementById('heart-app-entry-point');
12 const heartRenderer = new HeartRenderer();
13
14 heartRenderer.render(mainElement);
15 heartRenderer.activate();
16
17 /**
18 * Exported global object. This will contain the instance of the heart
19 * renderer being used. It is set up on load.
20 *
21 * @name App
22 * @type Object
23 * @property {HeartRenderer} heartRenderer The instance of the heart renderer being used.
24 */
25 window.App = {
26 heartRenderer
27 };
28 };
29
30 window.addEventListener('load', internals.onLoad);
31})(window);