diff options
author | metamuffin <metamuffin@disroot.org> | 2024-03-17 16:44:15 +0100 |
---|---|---|
committer | metamuffin <metamuffin@disroot.org> | 2024-03-17 16:44:15 +0100 |
commit | f11b04cd0b093fc11b156105b6aff470e70c54a3 (patch) | |
tree | bf4e68b42c0d5e50095361a2af39c1ccc349a921 /client-web/source/index.ts | |
parent | c8063785853e516280cd68e9d8e9ae79b2081989 (diff) | |
download | keks-meet-f11b04cd0b093fc11b156105b6aff470e70c54a3.tar keks-meet-f11b04cd0b093fc11b156105b6aff470e70c54a3.tar.bz2 keks-meet-f11b04cd0b093fc11b156105b6aff470e70c54a3.tar.zst |
replace window with globalThis
Diffstat (limited to 'client-web/source/index.ts')
-rw-r--r-- | client-web/source/index.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/client-web/source/index.ts b/client-web/source/index.ts index b085cb8..0ae9d66 100644 --- a/client-web/source/index.ts +++ b/client-web/source/index.ts @@ -16,7 +16,7 @@ import { control_bar, info_br } from "./menu.ts"; import { Chat } from "./chat.ts" export const VERSION = "1.0.1" -window.onload = () => main() +globalThis.onload = () => main() export interface ClientConfig { appearance?: { @@ -102,11 +102,11 @@ export async function main() { if (room_secret.length != 0) { set_room(state, room_secret, rtc_config) } - window.onhashchange = () => { + globalThis.onhashchange = () => { const new_secret = load_params().rsecret; set_room(state, new_secret, rtc_config) } - window.onbeforeunload = ev => { + globalThis.onbeforeunload = ev => { if (state.room && state.room.local_user.resources.size != 0 && PREFS.enable_onbeforeunload) { ev.preventDefault() return ev.returnValue = "You have local resources shared. Really quit?" |