title: onresize event not firing when accessing window width
body: <p>I've attached the onresize listener to the body tag just fine but when I change my code to access the <code>window.innerWidth</code> and <code>window.innerHeight</code> my resize event only works one time.</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
      function showMsg()
      {
          document.write((window.innerWidth / window.innerHeight) * 100 + "%");
      }
  &lt;/script&gt;
  &lt;body onresize="showMsg()"&gt;
  </code></pre>