[Seaside] JSScript objects have a canvas. Can I somehow use this
canvas to put escaped html in my js?
Julian Fitzell
jfitzell at gmail.com
Fri Mar 27 02:32:12 UTC 2009
On Fri, Mar 27, 2009 at 1:53 AM, Steven Noble <steven.noble at gmail.com>wrote:
> What I'm attempting to do is something like
>
> html button
> text: 'add put option';
> onClick: (html jQuery ajax
> script: [:s |
> s << (s jQuery id: 'options') append: (self
> someRenderFunction on:
> (s canvas)).
> "some dynamically generated js"]).
>
> Of course this doesn't work because 'append:' expects something that
> behaves like a string. But is there a way I can put some escaped html
> generated by a canvas in my dynamically generated js?
>
I think this won't work anyway because the canvas is for an old render
context. In fact, we've been talking about refactoring so that the JSObjects
only hold a render context or something instead of the canvas but it's
unclear if that will happen in this release cycle (I suspect not).
I think you ought to be able to use a Builder to get a canvas to use here.
It can then give you back a string. I think it's mostly geared around
passing whole components into it but you can probably get at the canvas and
pass it somewhere... look for sender of #builder and see if you can work it
out.
If not, I'm sure Lukas will have a much better solution for you tomorrow
anyway. ;)
Julian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20090327/0f9a22bd/attachment-0001.htm
More information about the seaside
mailing list