From c597ebf61d244dda966f8cc06799d897172fce84 Mon Sep 17 00:00:00 2001 From: Sarah Hoffmann Date: Fri, 5 Feb 2021 23:32:44 +0100 Subject: [PATCH] use svelte syntax for setting the popstate handler --- src/App.svelte | 3 +++ src/main.js | 5 ----- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/App.svelte b/src/App.svelte index e543afd..3e64b16 100644 --- a/src/App.svelte +++ b/src/App.svelte @@ -18,6 +18,9 @@ refresh_page(); +// deal with back-button and other user action + +
{#if view === 'search'} diff --git a/src/main.js b/src/main.js index f045059..a8269c6 100644 --- a/src/main.js +++ b/src/main.js @@ -41,8 +41,3 @@ document.addEventListener('click', function (e) { } } }); - -// deal with back-button and other user action -window.onpopstate = function () { - refresh_page(); -}; -- 2.39.5