by rohitnair · 14y ago · 0 comments
<body onload="initialize()">
The Maps API documentation here https://developers.google.com/maps/documentation/javascript/... still recommends it. Fortunately, they seem to have updated their maps API code samples to use something like this instead
google.maps.event.addDomListener(window, 'load', initialize);
Probably a minor thing, but I've seen people, especially beginners, who pick up the former style (which is generally considered a bad practice) because they've seen it on places like the Google Maps API docs.
No comments yet.