diff --git a/index.html b/index.html index 513a7b03..d90dec83 100644 --- a/index.html +++ b/index.html @@ -37,11 +37,11 @@ const promise = new Promise(r => resolve = r); const onMessage = function(event) { if (event.data.replyTo === body.id) { - worker.removeEventListener("message", onMessage); + navigator.serviceWorker.removeEventListener("message", onMessage); resolve(event.data.content); } } - worker.addEventListener("message", onMessage); + navigator.serviceWorker.addEventListener("message", onMessage); worker.postMessage(body); return promise; } diff --git a/src/main.js b/src/main.js index 91c31321..6e9571f4 100644 --- a/src/main.js +++ b/src/main.js @@ -148,6 +148,6 @@ export async function main(container, paths, legacyExtras) { const view = new RootView(vm); container.appendChild(view.mount()); } catch(err) { - console.error(`${err.message}:\n${err.stack}sdfdf`); + console.error(`${err.message}:\n${err.stack}dfdfdfdf`); } }