title: Can't pass event to addEventListener: closure issue
body: <p>This one's driving me crazy... I have a loop which adds an event listener to an SVG object. The object is, for the sake of argument, a small circle, and I have to add mouseover and mouseout events for each of the 10 circles.</p>
  
  <p>My first problem is the standard closure-scope thing - because all the listeners are added in the same loop, they all see the same invalid value of the loop variable. I can fix this, I think, but the second problem is that I have to pass 'event' to the listeners, and I can't find any way to fix both these issues simultaneously.</p>
  
  <p>I've tried various versions of this:</p>
  
  <pre><code>for(month = 0; month &lt; nMonths; month++) {
     ...
     shape.addEventListener(
       "mouseover", 
       (function(event, index) { popup_on(event, foo, index); })(event, month),
       false);
     group.appendChild(shape);
  }
  </code></pre>
  
  <p>This particular version gives me 'event is not defined'. <code>popup_on</code> is the real handler, and must get <code>event</code> and the current value of <code>month</code>. Any idea how I should be doing this? Thanks.</p>