title: Chrome Extension: window.innerWidth = 0 ? // bonus: maximizing window
body: <p>I am creating a chrome extension to easily swap between different screen sizes (in order to test responsive design). Although this already exists, I figured it would be a good excercise.</p>
  
  <p>I am running into 2 problems:</p>
  
  <ol>
  <li><p>When I try to calculate the size of the frame (window.width - window.innerWidth), window.innerWidth displays as 0 in the console log.</p></li>
  <li><p>I cannot find any way to easily maximize the window. I could resize to screen.width and screen.height, but that's not really maximizing. What are my options? The developer site and google itself didn't return much usable info.</p></li>
  </ol>
  
  <p>Here's some of my code:</p>
  
  <pre><code>function resize(win){
  window = win;
  frameWidth = window.width - window.innerWidth;
  frameHeight = window.height - window.innerHeight;
  console.log(window.innerWidth);
  ...
  }
  </code></pre>