title: Why scrollbars appear, when I resize the canvas?
body: <p>I made a page, where the canvas should fill the window. It works, but for some reason scrollbars appear. I don't know, what is the error.</p>
  
  <pre><code>&lt;!doctype html&gt;
  &lt;html&gt;
  
    &lt;head&gt;
      &lt;title&gt;test&lt;/title&gt;
      &lt;meta charset="utf-8" /&gt;
      &lt;style type="text/css"&gt;
        #canvas {
          background-color: #EEEEEE;
        }
        * {
          margin: 0px;
        }
      &lt;/style&gt;
      &lt;script type="text/javascript"&gt;
        function getSize() {
          var myWidth = 0, myHeight = 0;
          if( typeof( window.innerWidth ) == 'number' ) {
            //Non-IE
            myWidth = window.innerWidth;
            myHeight = window.innerHeight;
          } else if( document.documentElement &amp;&amp; ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
            //IE 6+ in 'standards compliant mode'
            myWidth = document.documentElement.clientWidth;
            myHeight = document.documentElement.clientHeight;
          } else if( document.body &amp;&amp; ( document.body.clientWidth ||          document.body.clientHeight ) ) {
            //IE 4 compatible
            myWidth = document.body.clientWidth;
            myHeight = document.body.clientHeight;
          }
          return {x:myWidth,y:myHeight};
        }
  
        window.onload = function () {
          canvas = document.getElementById('canvas');
          var size = getSize();
          canvas.width = size.x;
          canvas.height = size.y;
        };
      &lt;/script&gt;
    &lt;/head&gt;
  
    &lt;body&gt;
      &lt;canvas id="canvas" width="200" height="200"&gt;&lt;/canvas&gt;
    &lt;/body&gt;
  
  &lt;/html&gt;
  </code></pre>