[Seaside] WAHtmlRoot>>writeHeadOn: changed
Martial Boniou
martial.boniou at ifrance.com
Wed May 16 18:32:38 UTC 2007
Hi,
Between Seaside2.8a1-lr.220 (and previous) and the latest Seaside (317)
there is a big change in the order in the head attributes writing. As a
webmaster I think it's a bad order. The 2 last lines:
#writeHeadOn: aDocument
aDocument nextPutAll: docType.
aDocument openTag: 'html' attributes: htmlAttrs.
aDocument openTag: 'head' attributes: headAttrs.
self writeElementsOn: aDocument.
self writeScriptsOn: aDocument.
self writeStylesOn: aDocument. (...)
should become:
self writeStylesOn: aDocument.
self writeScriptsOn: aDocument.
because you can load CSS files through javascripts. For example, as
XHTML1.1 deprecated <noscript>, it's becoming a common way to load first
a global CSS (for non-javascript browsers or for those who disable it
(for more security in an intranet framework)) and then, to load a
special CSS with javascript:
var style=document.createElement("link");
style.setAttribute("rel", "stylesheet");
style.setAttribute("type", "text/css");
style.setAttribute("href", "/seaside/wafiles/special.css");
style.setAttribute("media", "screen");
to be sure that this special CSS might be loaded only if javascript is
enabled.
So this must be a good idea to restore this original order (it was done
like that in the previous version of Seaside).
Cheers,
--
Martial
More information about the seaside
mailing list