Until engine version v0.5.10 there was a link that you could click to see the Javascript source code. Maybe I can enable that feature again.
Also, there is already an option to execute Javascript directly.
In the event action, select category "Others" and type "Execute Javascript code".
Than you can already execute any Javascript code.
Look at image below.