1
0
silverbullet/webapp/boot.ts
2022-04-05 17:02:17 +02:00

23 lines
519 B
TypeScript

import { Editor } from "./editor";
import { safeRun } from "./util";
import { IndexedDBSpace } from "./spaces/indexeddb_space";
let editor = new Editor(
// new HttpRestSpace(""),
new IndexedDBSpace("pages"),
document.getElementById("root")!
);
safeRun(async () => {
await editor.init();
});
// @ts-ignore
window.editor = editor;
navigator.serviceWorker
.register(new URL("service_worker.ts", import.meta.url), { type: "module" })
.then((r) => {
// console.log("Service worker registered", r);
});