make lobby game post refresh page better
This commit is contained in:
parent
6b7fd4eff3
commit
e3bb2f5d8c
1 changed files with 3 additions and 6 deletions
|
@ -36,12 +36,9 @@ async function start_game() {
|
|||
};
|
||||
|
||||
xhr.open("POST", "/lobby");
|
||||
xhr.send(JSON.stringify(obj));
|
||||
xhr.addEventListener("loadend", refresh_state);
|
||||
|
||||
setTimeout(
|
||||
() => refresh_state(),
|
||||
200
|
||||
);
|
||||
xhr.send(JSON.stringify(obj));
|
||||
}
|
||||
|
||||
window.onload = () => refresh_state();
|
Loading…
Reference in a new issue