Looking to create a full-screen canvas in Google Chrome?
<style>
#canvas:-webkit-full-screen {
height:100%;
width: 100%;
}
</style>
<button onclick="fullScreen()">Full Screen</button>
<canvas id="canvas"></canvas>
<script>
function fullScreen() {
var c = document.getElementById("canvas");
c.webkitRequestFullScreen();
}
</script>
This snippet of code achieves a full-screen effect for the canvas, but currently only sets the height of the canvas to be fullscreen.