16 lines
472 B
Svelte
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>
|