[Seaside] Re: Sending messages to javascript objects

Ramon Leon ramon.leon at allresnet.com
Fri Apr 25 18:35:15 UTC 2008


> And finally, don't forget that we need to add new script to 
> #updateRoot:

Why?

> 
> updateRoot: htmlRoot
>   htmlRoot addScript: self foo.
> 
> What i don't like in code above:
> - script it is added manually, it would be more convenient to 
> add it automatically (as result of call to html callMethod: 
> #foo of: ...)
> - html root having no option to inline script in html, 
> instead it generates <script src=..>, it would be good to 
> have an option (a method, like WAHtmlRoot>>addScriptInline:, 
> which will generate script with source inlined on page, 
> because browser losing much more time to load script using 
> separate request rather than simply parse few lines of code , 
> and if your page contains too much scripts , a page load time 
> can be  slowed down dramatically.

You most certainly can render inline script directly, no need to attach to
head...

renderContentOn: html
 html script: 'alert("hello")'

Ramon Leon
http://onsmalltalk.com



More information about the seaside mailing list