Skip to content

Commit

Permalink
feat: use <svelte:window /> for listening window's events
Browse files Browse the repository at this point in the history
  • Loading branch information
vinayakkulkarni committed May 28, 2020
1 parent cba5df9 commit 3eed049
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/SOffline.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
};
</script>

<svelte:window on:online={updateOnlineStatus} on:offline={updateOnlineStatus} on:load={updateOnlineStatus}/>

{#if isOnline}
<slot name="online">
<!-- Fallback text -->
Expand Down

0 comments on commit 3eed049

Please sign in to comment.