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.
Get 50% Discount on All Your Purchases
at PrepAway.com - Latest Exam Questions
This is ONE TIME OFFER
50%
answer completely wrong!
0
0
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) }
}
0
0