Is there a hook somewhere that I missed to push some of the scripts in the library from head to bottom of html similar to updateRoot:? So far I patched a couple of methods on WAHtmlRoot, but I don't much like overrides.
Sent from my iPhone_______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
Isn't that what #addLoadScript does? The code looks like the default
script generator writes the scripts out just before closing the </body>. Is that what you mean? On Wed, Feb 9, 2011 at 10:13 PM, Boris Popov, DeepCove Labs <[hidden email]> wrote: > Is there a hook somewhere that I missed to push some of the scripts in the library from head to bottom of html similar to updateRoot:? So far I patched a couple of methods on WAHtmlRoot, but I don't much like overrides. > > Sent from my iPhone_______________________________________________ > seaside mailing list > [hidden email] > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
I thought that took strings, whereas I want to use API available on the root that normally populates headElements.
Sent from my iPhone On 2011-02-09, at 19:23, "Julian Fitzell" <[hidden email]> wrote: > Isn't that what #addLoadScript does? The code looks like the default > script generator writes the scripts out just before closing the > </body>. Is that what you mean? > > On Wed, Feb 9, 2011 at 10:13 PM, Boris Popov, DeepCove Labs > <[hidden email]> wrote: >> Is there a hook somewhere that I missed to push some of the scripts in the library from head to bottom of html similar to updateRoot:? So far I patched a couple of methods on WAHtmlRoot, but I don't much like overrides. >> >> Sent from my iPhone_______________________________________________ >> seaside mailing list >> [hidden email] >> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside >> > _______________________________________________ > seaside mailing list > [hidden email] > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
In reply to this post by Julian Fitzell-2
Here's what I ended up doing/hacking for the time being, so you get
better idea of what effect I'm trying to achieve, MyLibrary>>updateRoot: aHtmlRoot super updateRoot: aHtmlRoot. aHtmlRoot javascript url: 'https://yandex.st/modernizr/1.6/modernizr.min.js'. aHtmlRoot javascript bottom url: 'https://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js'. aHtmlRoot javascript bottom with: 'jQuery.noConflict();'. WAContentElement>>bottom self attributeAt: 'bottom' put: true. WAHtmlRoot>>writeElementsOn: aDocument aDocument openTag: 'title'; nextPutAll: title; closeTag: 'title'. (headElements reject: [:ea | self demoteElement: ea]) do: [:each | aDocument print: each]. WAHtmlRoot>>closeOn: aDocument (headElements select: [:ea | self demoteElement: ea]) do: [:each | each attributes removeKey: 'bottom'. aDocument print: each]. aDocument scriptGenerator close: self on: aDocument. self writeFootOn: aDocument. WAHtmlRoot>>demoteElement: ea ^(ea isKindOf: WAHtmlElement) and: [ea attributeAt: 'bottom' ifAbsent: [false]]. -Boris -----Original Message----- From: [hidden email] [mailto:[hidden email]] On Behalf Of Julian Fitzell Sent: Wednesday, February 09, 2011 7:21 PM To: Seaside - general discussion Subject: Re: [Seaside] Scripts at bottom? Isn't that what #addLoadScript does? The code looks like the default script generator writes the scripts out just before closing the </body>. Is that what you mean? On Wed, Feb 9, 2011 at 10:13 PM, Boris Popov, DeepCove Labs <[hidden email]> wrote: > Is there a hook somewhere that I missed to push some of the scripts in the library from head to bottom of html similar to updateRoot:? So far I patched a couple of methods on WAHtmlRoot, but I don't much like overrides. > > Sent from my iPhone_______________________________________________ > seaside mailing list > [hidden email] > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
Free forum by Nabble | Edit this page |