/* +page.svelte **/
<script>
import Component2 from "./Component2.svelte";
function abc() {
const element = new Component2({
target: document.querySelector('#abc')
})
}
</script>
<div id="abc" use:abc>dsaads</div>
/* Component2.svelte **/
<script>
export let params;
</script>
<div>
<table>
<tr>
<td>dsadasads</td>
</tr>
</table>
</div>
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter