diff options
| author | capellancitizen <thecapellancitizen@gmail.com> | 2024-06-19 10:43:07 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-06-19 11:43:07 -0300 |
| commit | ea8527eea59f98adca60b75ffea529a2273b78ef (patch) | |
| tree | 7969a47511296465fbe27f63dbd382177b7f1a7a /print/resources/pingworker.js | |
| parent | 58d725397cd4f342396da89e4c644db50511687f (diff) | |
PDF Preview webpage now pings in worker (#2993) (#2996)
* PDF Preview webpage now pings in worker (#2993)
Avoids a timeout that can happen if rendering the page takes too long
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 |
