Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
sagemathinc
GitHub Repository: sagemathinc/wapython
Path: blob/main/web/cowasm.org/src/index.ts
1067 views
1
import terminal from "./terminal";
2
import favicon from "./favicon.ico";
3
4
const link = document.createElement("div");
5
link.innerHTML =
6
`<div style='text-align:center;margin-bottom:15px;color:#555'><h3><img width="32px" height="32px" src="${favicon}" style="float:left; margin-left:15px"/><img width="32px" height="32px" src="${favicon}" style="float:right; margin-right:15px"/> CoWasm Python-Wasm Demo&nbsp;&nbsp;-&nbsp;&nbsp;<a target='_blank' style='text-decoration: none;' href='https://www.npmjs.com/package/python-wasm'>npm</a>&nbsp;&nbsp;&nbsp;<a target='_blank' style='text-decoration: none;' href='https://github.com/sagemathinc/cowasm#readme'/>GitHub</a></h3>CoWasm: Collaborative WebAssembly for servers and browsers. An alternative to Emscripten that is built using <a target='_blank' href='https://ziglang.org/'>Zig</a>.<br/>There is also a <a href='https://cowasm.sh' target='_blank'>CoWasm Shell demo</a>.</div>`;
7
document.body.appendChild(link);
8
const element = document.createElement("div");
9
document.body.appendChild(element);
10
document.body.style.margin = "0px";
11
12
const favlink = document.createElement("link");
13
favlink.rel = "icon";
14
favlink.href = favicon;
15
document.getElementsByTagName("head")[0].appendChild(favlink);
16
17
async function main() {
18
while (true) {
19
element.innerHTML = "";
20
await terminal(element);
21
}
22
}
23
24
main();
25
26