<advertisement>
It looks like a job for Drab!
</advertisement>
It just does what you want to archive, runs Elixir on the server from the event in a browser. For now, you can’t run elixir and JS in the same event, but it is in the todo and will be introduced in the future.