voby icon indicating copy to clipboard operation
voby copied to clipboard

Can't use <svg> as parent node to render

Open iacore opened this issue 5 months ago • 2 comments

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Bead Chain Force Simulation</title>
    <style>
      body {
        display: flex;
        justify-content: center;
      }
      svg {
        width: 800px;
        height: 800px;
        border: solid 1px;
      }
    </style>
  </head>
  <body>
    <svg>
    </svg>
    <script type="module">
      import { render, html } from 'voby';
      render(() => html`
      <circle cx="100" cy="100" r="10"/>
      `, document.querySelector("svg"))
    </script>
  </body>
</html>
 Uncaught Error: Invalid parent node
    render render.js:8
    <anonymous> index.html:24

iacore avatar Jul 03 '25 15:07 iacore

Oh, you might find this amusing: https://www.1a-insec.net/gist/vibe-coding/

iacore avatar Jul 03 '25 15:07 iacore

There's a more general version of this bug also 🥲 thanks for reporting it!

fabiospampinato avatar Jul 06 '25 16:07 fabiospampinato