named options
This commit is contained in:
parent
91b328f540
commit
bb4450e562
@ -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;
|
||||||
}
|
}
|
||||||
|
@ -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);
|
||||||
|
Loading…
Reference in New Issue
Block a user