title: Is it possible to render svelte component's (end result) HTML code as a string (escape/show raw HTML code)?
body: <p>I have a simple PrimaryButton.svelte component that contains &quot;HTML&quot; only (no script or style tags) and looks like this:</p>
  <pre><code>&lt;button class=&quot;btn-primary btn accent--br&quot;&gt;Primary button&lt;/button&gt;
  </code></pre>
  <p>Then I imported the component into App.svelte and it renders in the browser just fine, but I also want to show the HTML code of the component as well.</p>
  <p>App.svelte looks like this:</p>
  <pre class="lang-html prettyprint-override"><code>&lt;script&gt;
      import PrimaryButton from &quot;./components/Buttons/PrimaryButton.svelte&quot;;
  &lt;/script&gt;
  
  &lt;PrimaryButton/&gt;
  </code></pre>
  
  <p>I tried to render it as a string like this: <code>{PrimaryButton}</code> instead of <code>&lt;PrimaryButton/&gt;.</code>
  But the browser displayed this string:</p>
  <pre><code>class PrimaryButton extends SvelteComponentDev { constructor(options) { super(options); init(this, options, instance$5, create_fragment$5, safe_not_equal, {}); dispatch_dev(&quot;SvelteRegisterComponent&quot;, { component: this, tagName: &quot;PrimaryButton&quot;, options, id: create_fragment$5.name }); } }
  </code></pre>
  <p>I was kind of hoping it would show the HTML of the component as a string instead but I do sort of understand why that's not happening.</p>
  <p>How can I show the output HTML of the component as a string in the browser? What would you do?</p>