[Seaside] how to render access to a JS argument variable?
Chris Muller
asqueaker at gmail.com
Fri Oct 9 01:46:12 UTC 2015
Found something. JSAlias.
> html span
> class: 'PufMessageWidget' ;
> id: (self assureHtmlIdUsing: html) ;
> onClick: ((html javascript logger call: 'log' with: 'event')
> asFunction: #('event')).
I gave up on onClick: since I guess its better to set up event
bindings through jQuery's API. This binding does what I want, no
syntax error.
html script defer with:
((html jQuery id: (self assureHtmlIdUsing: html)) onClick:
((html javascript logger call: 'log' with: (html
javascript alias: 'event')) asFunction: #('event'))).
It seems like a pretty wordy way to write console.log(event), but the
intent reads clearly so, that's good..
More information about the seaside
mailing list