fixed event order issues with swapping

Signed-off-by: ari melody <ari@arimelody.me>
This commit is contained in:
ari melody 2024-04-17 18:29:39 +01:00
parent 0b401c058a
commit 0d1e694b59
7 changed files with 22 additions and 8 deletions

View file

@ -4,7 +4,6 @@ let caches = {};
async function cached_fetch(url) {
let cached = caches[url];
console.log("cache: " + cached);
const res = cached === undefined ? await fetch(url) : await fetch(url, {
headers: {
@ -113,4 +112,6 @@ window.addEventListener("popstate", event => {
swap(event.state, false);
});
bind(document.body);
document.addEventListener("DOMContentLoaded", () => {
bind(document.body);
});