JSFiddle - React, Tailwind, and code Playground

by KomathiKarunakaran

HTML

<canvas id="canvas" width="5" height="5"></canvas>

JavaScript

var canvas = document.getElementById('canvas');
console.log(canvas)
var dataURL = canvas.toDataURL();
console.log(dataURL);