<script>
  let heading = 'h1';
  let tag = 'div';
</script>

<svelte:element this={heading}>Foo</svelte:element>
<svelte:element this={tag}>Bar</svelte:element>