lh" />
</svg
><canvas id="canvas-lh" width="100" height="100"></canvas><br
><canvas id="canvas-rlh" width="100" height="100"></canvas>
<script>
function use_filter(canvas, filter_id) {
  const ctx = canvas.getContext("2d");
  ctx.font = "40px Ahem";
  ctx.filter = `url(./svg-filter.svg#${filter_id})`;
  ctx.fillStyle = "red";
  ctx.fillRect(0, 0, 100, 100);
}
window.addEventListener("load", async () => {
  use_filter(document.getElementById("canvas-lh"), "filter-lh");
  use_filter(document.getElementById("c