[Seaside] Re: Sending messages to javascript objects

Igor Stasenko siguctua at gmail.com
Fri Apr 25 18:36:08 UTC 2008


2008/4/25 Ramon Leon <ramon.leon at allresnet.com>:
> > 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")'
>

This is not an option, suppose i'm using a component which represents
an item in list.
Now, for each item in list it will call  html script: '' and produce
many <script> tags for each item, while i need to add it only once.

>  Ramon Leon
>  http://onsmalltalk.com
>
>
>
>  _______________________________________________
>  seaside mailing list
>  seaside at lists.squeakfoundation.org
>  http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>



-- 
Best regards,
Igor Stasenko AKA sig.


More information about the seaside mailing list