title: window.addEventListener('message', myFunction(event)) doesn't work
body: <p>I'm trying to understand why the following does not work.</p>
  
  <pre><code>var myFunction = function(event) {
      // do something with event
  };
  
  window.addEventListener('message', myFunction(event));
  </code></pre>
  
  <p>I get the following error: "ReferenceError: event is not defined".</p>
  
  <p>However, the following works and <code>event</code> is able to be used.</p>
  
  <pre><code>window.addEventListener('message', function(event) {
      // do something with event
  });
  </code></pre>
  
  <p>How can I use <code>event</code> in the first situation? Why is <code>event</code> only accessible in the second situation?</p>