2022-03-20 08:56:28 +00:00
|
|
|
import { Editor } from "./editor";
|
|
|
|
import { Space } from "./space";
|
|
|
|
import { safeRun } from "./util";
|
|
|
|
|
2022-03-31 12:28:07 +00:00
|
|
|
let editor = new Editor(new Space(""), document.getElementById("root")!);
|
2022-03-20 08:56:28 +00:00
|
|
|
|
|
|
|
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) => {
|
2022-03-21 14:21:34 +00:00
|
|
|
// console.log("Service worker registered", r);
|
2022-03-20 08:56:28 +00:00
|
|
|
});
|