I have to do a demo in a couple of weeks, and decided to put it together in HTML 5.
What a mistake.
Nothing works as you expect it to.
Lets start with setting a canvas size, first I tried ...
<canvas id="c" width="800" height="600"></canvas>
The canvas was full screen. So then I tried.
<canvas id="c" width="800" height="600" style='width:800px;height:600px'></canvas>
var canvas = document.getElementsByTagName('canvas');
canvas.width = 800;
canvas.height = 600;
I get a null pointer exception. So next I tried ....
canvas = document.getElementById('c');
The canvas was full screen. After banging my head against the wall for ten minutes, I tried adding some css
Guess what, the canvas was full screen.
At this point I have given up and binned it
I will do my demo using c++ and opengl even though I will have to do a lot more work.
Anybody actually got HTML 5 to work as expected?