title: Javascript only works in Google Chrome in debug mode
body: <p>The code below works fine in Internet Explorer, but in Chrome it only works if you are in debug mode, what's wrong?</p>
  
  <pre><code>window.onresize = function (e) {
   if (window.outerWidth === screen.width &amp;&amp; window.outerHeight == screen.height) {
      if (!fullscreen) {
          fullscreen = true;
          onfullscreenchange(true);
      }
   } else {
      if (fullscreen) {
          fullscreen = false;
          onfullscreenchange(false);
      }
    }
  };
  
  
  function onfullscreenchange(full) {
      alert(full);
  }
  </code></pre>