[Seaside] WAHtmlRoot>>writeHeadOn: changed
martial.boniou at ifrance.com
Wed May 16 19:08:46 UTC 2007
On Wed, 2007-05-16 at 20:48 +0200, Lukas Renggli wrote:
> > 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.
> Not just the order. The responsibilities of these objects has been
> changed a bit, for example WAHtmlRoot now also closes the XHTML
> document not just opens it ...
Yes and it makes more sense.
> > So this must be a good idea to restore this original order (it was done
> > like that in the previous version of Seaside).
> Thanks for pointing this issue out. I didn't thought of that, because
> I usually don't use #writeStylesOn: and #writeScriptsOn:.
> Seaside2.8a1-lr.322 reorders the elements like this:
> self writeStylesOn: aDocument.
> self writeScriptsOn: aDocument.
> self writeElementsOn: aDocument.
> I put #writeElementsOn: at the last position. I think this makes more
> sense, but I don't know how this was handled before?
test with firebug and type in #style:, #script: and WAFileLibrary during
the dev phase to export everything in a bundle. For deployment I use
Apache as you do.
For the last #writeElementsOn: message, I think it's better to have it
before all. I sampled the previous version's method:
aStream nextPutAll: '<title>', title, '</title>'.
headElements do: [:ea | ea writeOn: aStream].
styles do: [:ea | self writeStyle: ea on: aStream].
scripts do: [:ea | self writeScript: ea on: aStream].
in the latest lines of the head because scripts can shortcut everything"
More information about the seaside