aboutsummaryrefslogtreecommitdiff
path: root/client-web/source/protocol/mod.ts
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2024-11-25 20:59:54 +0100
committermetamuffin <metamuffin@disroot.org>2024-11-25 20:59:54 +0100
commit440c12ac024e84f166eaa4115ef6715c39de2eea (patch)
tree11f4a32e3478d6babee7fb30349c47d7f7983168 /client-web/source/protocol/mod.ts
parent55f58e1d7017ef0038840e2a9d506cfaf85e8ea8 (diff)
downloadkeks-meet-440c12ac024e84f166eaa4115ef6715c39de2eea.tar
keks-meet-440c12ac024e84f166eaa4115ef6715c39de2eea.tar.bz2
keks-meet-440c12ac024e84f166eaa4115ef6715c39de2eea.tar.zst
replace window usage with globalThis
Diffstat (limited to 'client-web/source/protocol/mod.ts')
-rw-r--r--client-web/source/protocol/mod.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/client-web/source/protocol/mod.ts b/client-web/source/protocol/mod.ts
index d554820..de4293d 100644
--- a/client-web/source/protocol/mod.ts
+++ b/client-web/source/protocol/mod.ts
@@ -21,7 +21,7 @@ export class SignalingConnection {
constructor() { }
async connect(): Promise<SignalingConnection> {
log("ws", "connecting…")
- const ws_url = new URL(`${window.location.protocol.endsWith("s:") ? "wss" : "ws"}://${window.location.host}/signaling`)
+ const ws_url = new URL(`${globalThis.location.protocol.endsWith("s:") ? "wss" : "ws"}://${globalThis.location.host}/signaling`)
this.websocket = new WebSocket(ws_url)
this.websocket.onerror = () => this.on_error()
this.websocket.onclose = () => this.on_close()
@@ -38,7 +38,7 @@ export class SignalingConnection {
on_close() {
log("ws", "websocket closed");
setTimeout(() => {
- window.location.reload()
+ globalThis.location.reload()
}, 1000)
}
on_open() {