mirror of
https://github.com/danog/2048.git
synced 2024-11-27 03:44:43 +01:00
Use querySelector instead of getElementsByClassName
This commit is contained in:
parent
29e4b85f32
commit
95a2676b3b
@ -1,7 +1,7 @@
|
|||||||
function HTMLActuator() {
|
function HTMLActuator() {
|
||||||
this.tileContainer = document.getElementsByClassName("tile-container")[0];
|
this.tileContainer = document.querySelector(".tile-container");
|
||||||
this.scoreContainer = document.getElementsByClassName("score-container")[0];
|
this.scoreContainer = document.querySelector(".score-container");
|
||||||
this.messageContainer = document.getElementsByClassName("game-message")[0];
|
this.messageContainer = document.querySelector(".game-message");
|
||||||
|
|
||||||
this.score = 0;
|
this.score = 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user