mirror of
https://github.com/DioxusLabs/dioxus
synced 2024-11-26 22:20:19 +00:00
47 lines
No EOL
1.2 KiB
HTML
47 lines
No EOL
1.2 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<title>dioxus | ⛺</title>
|
|
<meta content="text/html;charset=utf-8" http-equiv="Content-Type" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<meta charset="UTF-8" />
|
|
|
|
</head>
|
|
<body>
|
|
<div id="main"></div>
|
|
<script type="module">
|
|
import init from "/./assets/dioxus/name.js";
|
|
init("/./assets/dioxus/name_bg.wasm").then(wasm => {
|
|
if (wasm.__wbindgen_start == undefined) {
|
|
wasm.main();
|
|
}
|
|
});
|
|
</script>
|
|
|
|
</body>
|
|
</html><script>// Dioxus-CLI
|
|
// https://github.com/DioxusLabs/dioxus/tree/master/packages/cli
|
|
|
|
(function () {
|
|
var protocol = window.location.protocol === 'https:' ? 'wss:' : 'ws:';
|
|
var url = protocol + '//' + window.location.host + '/_dioxus/ws';
|
|
var poll_interval = 8080;
|
|
var reload_upon_connect = () => {
|
|
window.setTimeout(
|
|
() => {
|
|
var ws = new WebSocket(url);
|
|
ws.onopen = () => window.location.reload();
|
|
ws.onclose = reload_upon_connect;
|
|
},
|
|
poll_interval);
|
|
};
|
|
|
|
var ws = new WebSocket(url);
|
|
ws.onmessage = (ev) => {
|
|
if (ev.data == "reload") {
|
|
window.location.reload();
|
|
}
|
|
};
|
|
ws.onclose = reload_upon_connect;
|
|
})()
|
|
</script> |