JSFiddle - React, Tailwind, and code Playground
by mmansion
HTML
<canvas id="sketch"></canvas>
JavaScript
var c=document.getElementById("sketch");
var ctx=c.getContext("2d");
ctx.rect(20,20,150,100);
if (ctx.isPointInPath(20,50))
{
ctx.stroke();
};