title: window.document.addEventListener vs window.addEventListener
body: <p><code>window.document.addEventListener = function(event) {...}</code></p>
  
  <p><code>window.addEventListener = function(event) {...}</code></p>
  
  <p>What is the difference between these two lines of code? I get that window and document object are two different objects with different properties and <a href="http://eligeske.com/jquery/what-is-the-difference-between-document-and-window-objects-2/" rel="nofollow">this site</a> provides a good visual guide to the difference. Still I don't see the difference between what these two lines of code are doing.</p>
  
  <p>To further clarify: what is the difference in doing something like this:
  <code>window.addEventListener('mousemove', function (event) {...});</code>
  and doing something like this <code>window.document.addEventListener('mousemove', function (event) {...});</code>?</p>