Prevent new game button from reloading page
This commit is contained in:
parent
399fa7257c
commit
602d8b4d6f
|
@ -65,8 +65,9 @@ function initialize()
|
||||||
game = new Game("game");
|
game = new Game("game");
|
||||||
game.initialize();
|
game.initialize();
|
||||||
|
|
||||||
(/** @type {HTMLElement} */ (document.querySelector(".new-game"))).onclick = () =>
|
(/** @type {HTMLElement} */ (document.querySelector(".new-game"))).onclick = (event) =>
|
||||||
{
|
{
|
||||||
|
event.preventDefault();
|
||||||
game.reset();
|
game.reset();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue