rHeight</span><span class="p">;</span>
<span class="p">}</span>
</code></pre></div></div>

<h3 id="event-listeners">Event listeners</h3>

<p>Our app needs four event listeners:</p>

<ul>
  <li>a <a href="http://www.w3schools.com/jsref/met_document_addeventlistener.asp" class="underline">window event listener</a> to trigger the resize function when window is <a href="https://developer.mozilla.org/en-US/docs/Web/Events/resize" class="underline">resized</a></li>
  <li>a <a href="http://www.w3schools.com/jsref/