function overriding, onload precedence
<p>I'm developing some library and created this buggy code:</p>

<pre><code>//-------------------
Gmaps = {};
Gmaps.map = new Gmaps4RailsGoogle(); //there exists a default callback function in the created object
function load_map() {
  Gmaps.map.callback();
};
window.onload = load_map();
//--------------------
Gmaps.map.callback = function(){ alert('ok'); }
</code></pre>

<p>I thought, because the whole page is loaded, that <code>callback</code> would have been changed and <code>alert</code> message displayed.</p>

<p>But it's not the case and I haven't any error message in firebug.</p>

<p>If I then execute <code>Gmaps.map.callback()</code> in console, it works fine.</p>

<p>Is there any reason why the <code>callback</code> isn't overriden?</p>

<p>For context sake, code between <code>---------</code> is created by the library but developers would be able to override some functions in his html.</p>
