diff options
Diffstat (limited to 'print/resources/pingworker.js')
| -rw-r--r-- | print/resources/pingworker.js | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/print/resources/pingworker.js b/print/resources/pingworker.js new file mode 100644 index 00000000..ac4e81a9 --- /dev/null +++ b/print/resources/pingworker.js @@ -0,0 +1,9 @@ +function ping() { + fetch("/ping") + .then(() => setTimeout(ping, 1000)) + .catch((e) => { + console.error(e); + postMessage("error"); + }) +} +setTimeout(ping, 1000);
\ No newline at end of file |
