diff options
| author | Owen Jacobson <owen@grimoire.ca> | 2025-02-20 18:41:18 -0500 |
|---|---|---|
| committer | Owen Jacobson <owen@grimoire.ca> | 2025-02-20 18:41:18 -0500 |
| commit | 60f6b298329728fc8a91cd8c688c9b38fa302f0d (patch) | |
| tree | 8bc50c78a6898102fcfd5932236be5b2e0f9f751 /ui/routes/(app) | |
| parent | d57d68116ee8e5af583ef0bb1f87cf3f40d2b845 (diff) | |
Remove the last lingering Svelte4-style event bindings.
Diffstat (limited to 'ui/routes/(app)')
| -rw-r--r-- | ui/routes/(app)/+layout.svelte | 8 | ||||
| -rw-r--r-- | ui/routes/(app)/ch/[channel]/+page.svelte | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/ui/routes/(app)/+layout.svelte b/ui/routes/(app)/+layout.svelte index 3752bef..5ec84d9 100644 --- a/ui/routes/(app)/+layout.svelte +++ b/ui/routes/(app)/+layout.svelte @@ -99,18 +99,18 @@ } }); - function beforeUnload(evt) { - evt.preventDefault(); + function onbeforeunload(event) { + event.preventDefault(); if (events !== null) { events.close(); } // For some compat reasons? - evt.returnValue = ''; + event.returnValue = ''; return ''; } </script> -<svelte:window on:beforeunload={beforeUnload} /> +<svelte:window {onbeforeunload} /> <svelte:head> <!-- TODO: unread count? --> diff --git a/ui/routes/(app)/ch/[channel]/+page.svelte b/ui/routes/(app)/ch/[channel]/+page.svelte index dbdb507..9335198 100644 --- a/ui/routes/(app)/ch/[channel]/+page.svelte +++ b/ui/routes/(app)/ch/[channel]/+page.svelte @@ -58,7 +58,7 @@ } let lastReadCallback = null; - function handleScroll() { + function onscroll() { clearTimeout(lastReadCallback); // Fine if lastReadCallback is null still. lastReadCallback = setTimeout(setLastRead, 2 * 1000); } @@ -66,7 +66,7 @@ <svelte:window onkeydown={handleKeydown} /> -<div class="active-channel" on:scroll={handleScroll} bind:this={activeChannel}> +<div class="active-channel" {onscroll} bind:this={activeChannel}> <ActiveChannel {messageRuns} /> </div> <div class="create-message"> |
