You need to implement the button functionality

DRAG DROP
You are developing 3 Windows Store game. The game uses a JavaScript library named
GetGame.js.
The game interface will include two buttons. One button will start a new game and one
button will cancel the game.
You need to implement the button functionality.
Develop the solution by arranging the code segments in the correct order. You will need all
of the code segments.

DRAG DROP
You are developing 3 Windows Store game. The game uses a JavaScript library named
GetGame.js.
The game interface will include two buttons. One button will start a new game and one
button will cancel the game.
You need to implement the button functionality.
Develop the solution by arranging the code segments in the correct order. You will need all
of the code segments.

Answer:



Leave a Reply 2

Your email address will not be published. Required fields are marked *


chicco

chicco

answer completely wrong!

Moe

Moe

1) var doGame;
document.getElementById(‘workersStartGameButton’).addEventListener(‘click’, handle_workersStartGameButton, flase);
document.getElementById(‘workersCancelGameButton’).addEventListener(‘click’, handle_workersCancelGameButton, false);
2) doGame.onmessage = function(e){
if(e.data.isThisAGame){
outputBox.innerHTML = n + ” is a game.”;
}
}
3) function handle_workersStartGameButton(){
4) doGame = new Worker(“GetGame.js”);
5) }
function handle_workersCancelGameButton(evt)
{
if (doGame){
6) doGame.terminate();
7) doGame = null;
8) }
}