Re: how to render access to a JS argument variable?

Chris Muller <[email protected]>
Newsgroups gmane.comp.lang.smalltalk.squeak.seaside
Message-ID <CANzdToGvOO-yyP0M7eVhhOd1wvt9sqbV7oOCf=msD9A7SkUXLg@mail.gmail.com>
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..
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.