Spaces:
Paused
Paused
Download src/lib/components/Portal.svelte from vollsteksolutions/test: direct link, hf CLI and curl.
- Browser
- Download file 312 Bytes
-
https://huggingface.co/spaces/vollsteksolutions/test/resolve/main/src/lib/components/Portal.svelte
- Command line
-
hf download hf://spaces/vollsteksolutions/test/src/lib/components/Portal.svelte
-
curl -L -o Portal.svelte https://huggingface.co/spaces/vollsteksolutions/test/resolve/main/src/lib/components/Portal.svelte
312 Bytes
| <script lang="ts"> | |
| import { onMount, onDestroy } from "svelte"; | |
| let el: HTMLElement; | |
| onMount(() => { | |
| el.ownerDocument.body.appendChild(el); | |
| }); | |
| onDestroy(() => { | |
| if (el?.parentNode) { | |
| el.parentNode.removeChild(el); | |
| } | |
| }); | |
| </script> | |
| <div bind:this={el} class="contents" hidden> | |
| <slot /> | |
| </div> | |