On Sat, Dec 8, 2012 at 6:34 PM, Thomas Gratier
<[email protected]> wrote:
> 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?

Hysterical Raisins
(http://www.catb.org/jargon/html/H/hysterical-reasons.html). I agree
that using windows.onload is more in line with the "Separation of
behavior from markup" practice described in
<http://en.wikipedia.org/wiki/Unobtrusive_JavaScript>.

-- 
Eric Lemoine

Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le Bourget du Lac, Cedex

Tel : 00 33 4 79 44 44 94
Mail : [email protected]
http://www.camptocamp.com
_______________________________________________
Users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-users

Reply via email to