You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
275 B
25 lines
275 B
3 years ago
|
<script>
|
||
|
import { onMount } from 'svelte';
|
||
|
export let source = "";
|
||
|
let code = "";
|
||
|
|
||
|
onMount(() => {
|
||
|
fetch(source)
|
||
|
.then(resource => resource.text())
|
||
|
.then(data => code = data);
|
||
|
});
|
||
|
</script>
|
||
|
|
||
|
|
||
|
<style>
|
||
|
|
||
|
</style>
|
||
|
|
||
|
|
||
|
<pre>
|
||
|
<code>
|
||
|
{code}
|
||
|
</code>
|
||
|
</pre>
|
||
|
|