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