Javascript not loading properly in LiveView

HTML5 specifies that a <script> tag inserted with innerHTML should not execute.


Update:


Aside: Phoenix 1.4 uses webpack as a bundler and LiveView itself uses modular JavaScript - so I wouldn’t recommend mixing that with non-modular JavaScript - even it it seems to work in the short term.

1 Like