Possible Duplicate:
HTML5 Canvas resize to fit window
I'm developing HTML5 game for mobile phone.
I want to stretch the canvas to take the full phone width and hieght.
I'm using this code but it not very accurate:
ourCanvas = document.getElementById('gameCanvas');
context = ourGameCanvas.getContext( '2d' );
ourCanvas.width = $(window).width();
ourCanvas.height = $(window).height();
Any suggestions?