<!DOCTYPE html>
<html>
<body>
<script type="text/javascript">
const canvasElem = document.createElement('canvas');
document.body.appendChild(canvasElem);
const ctx = canvasElem.getContext('2d');
ctx.fillRect(0, 0, canvasElem.width, canvasElem.height);
</script>
</body>
</html>