XML文書中のcanvas要素 { const canvas = document.querySelector("canvas"); canvas.width = canvas.height = 200; const ctx = canvas.getContext("2d"); ctx.fillRect(50, 50, 100, 100); }); ]]>