title: Google Maps API V3 window load eventListener not working in some browsers
body: <p>A strange behaviour:
  The last part of the <a href="http://code.google.com/apis/maps/documentation/javascript/events.html#EventListeners" rel="nofollow noreferrer">Documentation</a> on events inside maps API says that </p>
  
  <pre><code>&gt;  If you've been reading the documentation this far, you're probably
  &gt; already familiar with one DOM event: the window.onload event, which
  &gt; we've handled within the &lt;body&gt; tag. We use this event to trigger the
  &gt; initial Javascript code once an HTML page is fully loaded, as shown
  &gt; below: &lt;script&gt;   function initialize() {
  &gt; 
  &gt;     // Map initialization
  &gt; 
  &gt;   } &lt;/script&gt; &lt;body onload="initialize()"&gt;   &lt;div
  &gt; id="map_canvas"&gt;&lt;/div&gt; &lt;/body&gt; Although this event is attached to the
  &gt; &lt;body&gt; element here, this event is really a window event indicating
  &gt; that the DOM hierarchy below the window element has been fully built
  &gt; out and rendered. Although easy to understand, having an onload event
  &gt; within a &lt;body&gt; tag mixes content with behavior. Generally, it is good
  &gt; practice to separate your content code (HTML) from your behavioral
  &gt; code (Javascript) and provide your presentation code (CSS) separately
  &gt; as well. You can do so by replacing the inline onload event handler
  &gt; with a DOM listener within your Maps API Javascript code like so:
  &gt; &lt;script&gt;   function initialize() {
  &gt; 
  &gt;     // Map initialization
  &gt; 
  &gt;   }
  &gt;      google.maps.event.addDomListener(window, 'load', initialize);
  &gt; &lt;/script&gt; &lt;body&gt;   &lt;div id="map_canvas"&gt;&lt;/div&gt; &lt;/body&gt;
  </code></pre>
  
  <p>Somehow <code>google.maps.event.addDomListener(window, 'load', initialize);</code> doesn't work for Firefox/Safari, but  <code>&lt;body onload="initialize()"&gt;</code> does...
  Any ideas why?</p>