Help is appreciated.
normally, passing objects is not really possible.
however, if you can make it a json or simple text, it's simple.
just an expression in the webblock with something like:
"<script>var myVar = " + someAction.toJSON + ";</script>"