epoxy-tls/client/index.html
2024-02-28 23:08:56 -08:00

38 lines
1.4 KiB
HTML

<html>
<head>
<title>epoxy</title>
<style>
body { font-family: monospace; font-weight: bold; width: 100%; height: 100%; padding: 0; margin: 0 }
body > div { padding: 1em; }
#logs > * { margin: 0; font-weight: normal; }
</style>
<script>
const params = (new URL(window.location.href)).searchParams;
const should_feature_test = params.has("feature_test");
const should_multiparallel_test = params.has("multi_parallel_test");
const should_parallel_test = params.has("parallel_test");
const should_multiperf_test = params.has("multi_perf_test");
const should_perf_test = params.has("perf_test");
const should_ws_test = params.has("ws_test");
const should_tls_test = params.has("rawtls_test");
const worker = new Worker("demo.js");
worker.onmessage = (msg) => {
let el = document.createElement("pre");
el.innerHTML = msg.data;
document.getElementById("logs").appendChild(el);
window.scrollTo(0, document.body.scrollHeight);
};
worker.postMessage([should_feature_test, should_multiparallel_test, should_parallel_test, should_multiperf_test, should_perf_test, should_ws_test, should_tls_test]);
</script>
</head>
<body>
<div>
<div>running... (note: WASM is significantly slower when DevTools is open)</div>
<div>logs:</div>
<div id="logs"></div>
</div>
</body>
</html>