There's a bit more nuance to how this should really work, but let's at
least make sure we execute <script> elements if you insert them into
the document.
This fills in a bunch of the FIXMEs that was in prepare_script.
execute_script is almost finished, it's just missing the module side.
As an aside, let's not assert when inserting a script element with
innerHTML.