We use the "t:messagelistener" like this:
<t:messagelistener actionListener="#{d.JScriptAction.onMessageEvent}" commandfilter="#{d.JScriptAction.commandFilter}" />
The command filter has to define the allowed actions.
Within JScriptAction#onMessageEvent we map the action to the button action.
The call looks like this:
{RISCHtmlNode}.sendTextMessage("tuWas(" + action + ")