tion(editContext.text.length, editContext.text.length);
        }
      }

      selectionStart = editContext.selectionStart;
      selectionEnd = editContext.selectionEnd;
    });

    canvas.addEventListener("focus", () => {
      rafID = requestAnimationFrame(render);
    });

    canvas.addEventListener("blur", () => {
      cancelAnimationFrame(rafID);
    });
  </script>
</body>

</html>