title: JavaScript calculate with viewport width/height
body: <p>I am trying to set a responsive point in my mobile Webview and did this:</p>
  
  <pre><code>var w = window.innerWidth-40;
  var h = window.innerHeight-100;
  </code></pre>
  
  <p>This works great so far. But the values -40 and -100 are not in the viewport scaling height and width.</p>
  
  <p>When I do this: </p>
  
  <pre><code>var w = window.innerWidth-40vw;
  var h = window.innerHeight-100vh;
  </code></pre>
  
  <p>as it should be to stay responsive and relative to the viewport - the JS does not work anymore.
  I think vh and vw works only in CSS ?
  How can I achieve this in JS ?</p>
  
  <p>Pleas no JQuery solutions - only JS!</p>
  
  <p>Thanks</p>