s.js"></script>

<svg xmlns="http://www.w3.org/2000/svg">
  <defs>
    <rect id="target" width="100" height="100" onclick="click()" onmouseover="handleMouseOver()"/>
  </defs>
  <use id="use" href="#target"/>
</svg>

<script>
  const use = document.getElementById("use");
  function click() {
    document.getElementById("target").setAttribute("fill", "green");
  }

  function handleMouseOver() {
    document.getElementById("target").setAttribute("fill", "red");
  }

  requestAnimationFrame(() => requestAnima