named options

This commit is contained in:
Bruno Windels 2020-11-30 12:49:31 +01:00
parent 91b328f540
commit bb4450e562
2 changed files with 3 additions and 3 deletions

View File

@ -19,8 +19,8 @@ import {ViewModel} from "./utils/ViewModel.js";
import {PreviewViewModel} from "./preview/PreviewViewModel.js"; import {PreviewViewModel} from "./preview/PreviewViewModel.js";
export class RootViewModel extends ViewModel { export class RootViewModel extends ViewModel {
constructor(request) { constructor(options) {
super({request}); super(options);
this.link = null; this.link = null;
this.previewViewModel = null; this.previewViewModel = null;
} }

View File

@ -3,7 +3,7 @@ import {RootViewModel} from "./RootViewModel.js";
import {RootView} from "./RootView.js"; import {RootView} from "./RootView.js";
export async function main(container) { export async function main(container) {
const vm = new RootViewModel(xhrRequest); const vm = new RootViewModel({request: xhrRequest});
vm.updateHash(location.hash); vm.updateHash(location.hash);
window.__rootvm = vm; window.__rootvm = vm;
const view = new RootView(vm); const view = new RootView(vm);