aboutsummaryrefslogtreecommitdiff
path: root/src/content/index.ts
blob: 5b9b92cf8c4000629a539ed3aa64f3742d42b7ce (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import 'reflect-metadata';

import Application from './Application';
import consoleFrameStyle from './site-style';
import { ConsoleFramePresenterImpl } from './presenters/ConsoleFramePresenter';
import { container } from 'tsyringe';
import './di';

if (window.self === window.top) {
  new ConsoleFramePresenterImpl().initialize();
}

try {
  let app = container.resolve(Application);
  app.run();
} catch (e) { console.error(e); }

let style = window.document.createElement('style');
style.textContent = consoleFrameStyle;
window.document.head.appendChild(style);