blob: b0e82a689bb32a387c35039ca783e2ef21db7d34 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
<script lang="ts">
import { onDestroy, onMount } from 'svelte';
import '../app.css';
let { children } = $props();
let mounted = $state(false);
onMount(async () => {
(globalThis as any).browser = (
await import('webextension-polyfill')
).default;
mounted = true;
});
onDestroy(() => (mounted = false));
</script>
{#if mounted}
{@render children()}
{:else}
<p>Waiting on Mount</p>
{/if}
|