Looking at my canvas element:
<canvas id='arena'></canvas>
This Element is set to fill the entire website window. It's contained within a div Element, both of which are set to 100% size. I attempted running this script:
var c = document.getElementById('arena');
var ctx = c.getContext("2d");
console.log(c.width+' '+c.height);
The result I got was 300 150. However, upon checking the console, it showed the canvas dimensions as 2000*1000px Can you spot the mistake in this code?