hypnagaga/src/components/PymChild/PymChild.svelte
2022-09-24 10:58:04 +01:00

16 lines
472 B
Svelte

<!-- @component `PymChild` [Read the docs.](https://reuters-graphics.github.io/graphics-components/?path=/docs/utilities-PymChild--default) -->
<script lang="ts">
/** Pym.js polling interval */
export let polling: number = 500;
import { onMount } from 'svelte';
import pym from 'pym.js';
import { pymChildStore } from './stores.js';
let pymChild;
onMount(() => {
pymChild = new pym.Child({ polling });
pymChildStore.set(pymChild);
});
</script>