title: How to stop Google Maps closeclick event propagation
body: <p>I have a <code>click</code> event binded on an element which contains a Google Map. When the user close an InfoWindow on the map clicking on the cross, the click event is fired and propagate all over the DOM. I want to stop this event propagation, so the infoWindow closes but the click event is no raised on my container.</p>
  
  <p>Google Maps API provide a <code>closeclick</code> event which is raised when the InfoWindow is closed, however <strong>this event can't be accessed</strong> (it is not present as a parameter):</p>
  
  <pre><code>google.maps.event.addListener(infowindow, "closeclick", function() {
      // The API function doesn't have the e parameter, I can't access closeclick
  });
  </code></pre>
  
  <p>As my container is binded to <code>click</code> anyway, I'm not even sure <code>closeclick.stopPropagation()</code> would have worked. So I'm looking for a way to access the click event thrown by Google Map when the user clicks the cross. Of course, the html of google maps is so messed up I can't access the cross DOM element to add an eventListener to it (it's only divs everywhere, without any classes).</p>
  
  <p>Any suggestions?</p>
  
  <p>Edit: As a workaround, I fixed this problem by modifying my own code and testing where the event comes from when it is catched by my container:</p>
  
  <pre><code>container.addEventListener('click', function(ev) {
      if (ev.target.src == 'https://maps.gstatic.com/mapfiles/api-3/images/mapcnt6.png') {
          return false;
      }
      // the code I want to execute only when the click event doesn't come from the InfoWindow
  });
  </code></pre>