-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
34 lines (33 loc) · 1005 Bytes
/
index.html
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
29
30
31
32
33
34
<!doctype html>
<html>
<head>
<meta charset="utf-8"/>
<title>crosscall demo</title>
<style>
html, body {
min-height: 100%;
background: #222;
color: #aaa;
}
a { color: skyblue; }
a:hover { color: lightblue; }
</style>
</head>
<body>
<h1>crosscall <span class="result"></span></h1>
<a href="https://github.com/chase-moskal/crosscall">crosscall on github</a>
<script type="importmap-shim" src="dist/importmap.json"></script>
<script type="module-shim">
import {exampleClient} from "./dist/internals/examples/example-client.js"
const url = "http://localhost:8023/host"
async function mainClient() {
const success = await exampleClient(url)
const report = success ? "✔" : "✘"
document.querySelector(".result").textContent = report
console.log(`${report} crosscall ${success ? "works" : "fails"}`)
}
mainClient()
</script>
<script src="https://unpkg.com/es-module-shims@0.4.6/dist/es-module-shims.js"></script>
</body>
</html>