Files
matrix.to-dracula-theme/src/main.js
T
Bruno Windels bb4450e562 named options
2020-11-30 12:49:31 +01:00

14 lines
440 B
JavaScript

import {xhrRequest} from "./utils/xhr.js";
import {RootViewModel} from "./RootViewModel.js";
import {RootView} from "./RootView.js";
export async function main(container) {
const vm = new RootViewModel({request: xhrRequest});
vm.updateHash(location.hash);
window.__rootvm = vm;
const view = new RootView(vm);
container.appendChild(view.mount());
window.addEventListener('hashchange', event => {
vm.updateHash(location.hash);
});
}