-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathtest.html
More file actions
28 lines (27 loc) · 909 Bytes
/
test.html
File metadata and controls
28 lines (27 loc) · 909 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<!DOCTYPE html>
<html lang="en" style="height: 100%;">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body style="height: 100%; width: 100%;">
<div style="height: 100%; width: 100%; display: flex; align-items: center; justify-content: center; flex-direction: column;">
<div>Resultat</div>
<div>|</div>
<div>|</div>
<div>v</div>
<div id="test" style="color: red; padding: 16px 48px; border: 2px solid black;"></div>
</div>
</body>
<script>
WebAssembly.instantiateStreaming(fetch("test.wasm")).then(
(obj) => {
result = obj.instance.exports.f();
test_div = document.getElementById('test')
test_div.textContent = result
console.log(result)
}
)
</script>
</html>