HTML and CSS Reference
In-Depth Information
<
script type
=
"text/javascript"
src
=
"DisplayList.js"
><
/script>
<
script type
=
"text/javascript"
src
=
"GameUtilities.js"
><
/script>
<
script type
=
"text/javascript"
src
=
"DragAndDrop.js"
><
/script>
<
script type
=
"text/javascript"
src
=
"Ornament.js"
><
/script>
</head>
</head>
<body>
<body>
<div align=
"center"
>
<canvas id=
"canvasOne"
width=
"640"
height=
"480"
style=
"cursor: default;"
>
Your browser does not support the HTML 5 Canvas.
</canvas>
</div>
</body>
</html>
Next, we need to update
default.js
. This time, we will add the call to
DragAndDrop()
that
is in
draganddrop.js
so that the application will start when Windows 8 is ready. Add the call
in the section with the following comment:
// TODO: This application has been newly launched. Initialize
// your application here.
Leave everything else untouched. This will make sure our app starts as soon as Windows 8 is
ready for our program to run.
// For an introduction to the Blank template, see the following documentation:
// http://go.microsoft.com/fwlink/?LinkId=232509
(
function
function
() {
"use strict"
;
WinJS
.
Binding
.
optimizeBindingReferences
=
true
true
;
var
var
app
=
WinJS
.
Application
;
var
var
activation
=
Windows
.
ApplicationModel
.
Activation
;
app
.
onactivated
=
function
function
(
args
) {
iif
(
args
.
detail
.
kind
===
activation
.
ActivationKind
.
launch
) {
iif
(
args
.
detail
.
previousExecutionState
!==
activation
.
ApplicationExecutionState
.
terminated
) {
// TODO: This application has been newly launched. Initialize
// your application here.
DragAndDrop
();
}
else
else
{
// TODO: This application has been reactivated from suspension.
// Restore application state here.
}
args
.
setPromise
(
WinJS
.
UI
.
processAll
());