[OpenLayers-Users] Best practices: windows.onload or <body onload="init()">

Thomas Gratier osgeo.mailinglist at gmail.com
Sat Dec 8 09:34:28 PST 2012


Hello,

I'm a bit curious about OpenLayers examples

They rely on

 <body onload="init()">

but Unobtrusive JavaScript principles (
http://en.wikipedia.org/wiki/Unobtrusive_JavaScript) tell you to use
something like

windows.onload = function() { init(); }

So, why Openlayers examples are using the first syntax?


Regards

ThomasG
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/openlayers-users/attachments/20121208/240b2869/attachment.html>


More information about the Users mailing list