1
0
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:
Grégory HOULLIER 2014-03-12 08:59:12 +01:00
parent 29e4b85f32
commit 95a2676b3b

View File

@ -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;
} }