It confuses scripts when it is triggered twice. Instead of passing the
global context, we simply write it into the HTML of the iframe.
We need to encode it in base64 to avoid context confusion (e.g. `</script>`
inside the JSON of the global context).
With this commit, the virtual HTML file is processed before it's fed to
the iframe and thus rendered. With the previous approach, script tags
with inline JavaScript were executed first and script tags with a
virtual `src` were executed last. This messed up the execution flow of
the document.