feat: add Dioxus.toml
This commit is contained in:
1 parent
70adff7e44
commit
9bb10c65a3
13 files changed
+269
-170
No files matched your search
@@ -0,0 +1,25 @@
|
||||
(function () {
|
||||
var protocol = window.location.protocol === "https:" ? "wss:" : "ws:";
|
||||
|
||||
var url = protocol + "//" + window.location.host + "/_dioxus/ws";
|
||||
|
||||
var poll_interval = 2000;
|
||||
|
||||
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;
|
||||
})();
|
||||
Reference in new issue
Block a user