JSFiddle - React, Tailwind, and code Playground

by ChaseWest

HTML

<canvas id="foo" class="canvasstyle" height="300" width="300"></canvas>

JavaScript

var foo = document.getElementById("foo");
var canvas = document.createElement('canvas');
canvas.setAttribute("width", 300);
canvas.setAttribute("height", 300);
foo.appendChild(canvas);