I am using the below code to set the height and width property of a canvas element. The sizes do not seem to be returned in pixel.
(function(){
var width = $(window).width(),
height = $(window).height();
canvas.width = width;
canvas.height = height;
})()
Is there a way to change I can check the unit of this value or get the pixel equivalent without converting in my script?