class Boot { constructor(app) { console.log("Init Boot"); this.app = app; this.renderTitle(); this.includeCSS(); this.loader = new Loader(); } includeCSS() { const head = document.querySelector('head'); for(let cssfile of config.include.css) { head.innerHTML = head.innerHTML + `<style type="text/css" rel="stylesheet" src="${cssfile}">`; } } renderTitle() { document.querySelector('title').innerHTML = config.title + " " + config.version; } } const kernelInit = (function(app){ this.boot = new Boot(app); return this; }); let app = {}; document.addEventListener("DOMContentLoaded", e => { app.kernel = kernelInit(); });