Revert "Merge pull request #3 from JonasKruckenberg/revert-2-feat/window"
This reverts commit896fc516d3
, reversing changes made to5d6ea2060c
.
This commit is contained in:
parent
896fc516d3
commit
8911f55920
67 changed files with 11705 additions and 573 deletions
35
examples/test/dist/index.html
vendored
Normal file
35
examples/test/dist/index.html
vendored
Normal file
|
@ -0,0 +1,35 @@
|
|||
<!DOCTYPE html><html><head>
|
||||
<meta charset="utf-8">
|
||||
<title>Tauri + Yew App</title>
|
||||
|
||||
<link rel="preload" href="/tauri-sys-test-ui-3eb704384493bbf2_bg.wasm" as="fetch" type="application/wasm" crossorigin="">
|
||||
<link rel="modulepreload" href="/tauri-sys-test-ui-3eb704384493bbf2.js"></head>
|
||||
<body>
|
||||
<script type="module">import init from '/tauri-sys-test-ui-3eb704384493bbf2.js';init('/tauri-sys-test-ui-3eb704384493bbf2_bg.wasm');</script><script>(function () {
|
||||
var protocol = window.location.protocol === 'https:' ? 'wss:' : 'ws:';
|
||||
var url = protocol + '//' + window.location.host + '/_trunk/ws';
|
||||
var poll_interval = 5000;
|
||||
var reload_upon_connect = () => {
|
||||
window.setTimeout(
|
||||
() => {
|
||||
// when we successfully reconnect, we'll force a
|
||||
// reload (since we presumably lost connection to
|
||||
// trunk due to it being killed, so it will have
|
||||
// rebuilt on restart)
|
||||
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) => {
|
||||
const msg = JSON.parse(ev.data);
|
||||
if (msg.reload) {
|
||||
window.location.reload();
|
||||
}
|
||||
};
|
||||
ws.onclose = reload_upon_connect;
|
||||
})()
|
||||
</script></body></html>
|
Loading…
Add table
Add a link
Reference in a new issue