title: How to make HTML5 Canvas full page size with Cocos2D
body: <p>I'm new to Cocos2D-HTML5 (and HTML5 itself) and I'm trying to get the canvas to be the full size of the page. I'm confused by how few issues are documented about this on the internet, so I hope it's actually really simple.</p>
  
  <p>The problem is that the <code>&lt;canvas&gt;</code> element doesn't accept <code>width="100%"</code> or <code>height="100%"</code>, but only pixels (but then it won't stretch to fit the window).</p>
  
  <p>I have also tried solutions as described <a href="https://stackoverflow.com/questions/15525560/html5-canvas-fit-to-window">here</a> (css as well as javascript), but it seems that Cocos2D resizes the canvas to fit the <code>width</code> and <code>height</code> properties nonetheless, and if omitted, uses a default size of 300 x 150 px (without Cocos2D I do get a full-page canvas).</p>
  
  <p>How can I change the canvas size to fit the page in Cocos2D itself?</p>