Canvas is by default an inline
element. And inline elements have a white space underneath them, for the descenders, parts of the letter like "g" or "y" that are below the baseline.
So, just set your canvas to block:
canvas.style.display = 'block';
Or with CSS.
And the meta viewport is a comma-separated list:
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0">