-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex.html
More file actions
18 lines (16 loc) · 764 Bytes
/
index.html
File metadata and controls
18 lines (16 loc) · 764 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<html>
<head>
<link rel="modulepreload" href="./pkg/MultipleChoiceTestSimulatorLib.js" crossorigin=anonymous>
<link rel="preload" href="./pkg/MultipleChoiceTestSimulatorLib_bg.wasm" crossorigin=anonymous as="fetch" type="application/wasm"></head>
</head>
<body>
<!-- The WASM code will resize the canvas dynamically -->
<!-- the id is hardcoded in main.rs . so, make sure both match. -->
<canvas id="quiz_app"></canvas>
<script type="module">
import init, * as bindings from './pkg/MultipleChoiceTestSimulatorLib.js';
const wasm = await init('./pkg/MultipleChoiceTestSimulatorLib_bg.wasm');
bindings.start_quiz("quiz_app", window.location.href + "/dummy_quiz.json", true);
</script>
</body>
</html>