I'm trying to inject a script into the DOM but the script is not actually ran. What am I doing wrong? The console.log is not executed.
document.getElementById('container').innerHTML = '<div class="x"><script type="application/javascript">console.log("a");</script></div>';