As far as I know, the Google loader is using document.write
to add scripts to the page. document.write
only works before the window has fully loaded, so it seems you can't use google.load
inside of window.onload
. I'd recommend putting whatever code you need inside of the google.setOnLoadCallback
function - window.onload
works fine in there.
Alternatively, you can autoload the Google APIs so that the onLoadCallback is unnecessary like this (see docs for more info):
<script type="text/javascript" src="http://www.google.com/jsapi?autoload={modules:[{name:gdata,version:2.x,packages:[blogger]}]}"></script>
Also check out the jQuery library because it has functions like $(document).ready()
that improve greatly on window.onload.