aboutsummaryrefslogtreecommitdiff
path: root/emcc
diff options
context:
space:
mode:
Diffstat (limited to 'emcc')
-rwxr-xr-xemcc5
1 files changed, 5 insertions, 0 deletions
diff --git a/emcc b/emcc
index 621cb340..e02854bd 100755
--- a/emcc
+++ b/emcc
@@ -1973,6 +1973,11 @@ try:
if debug_level >= 4:
generate_source_map(target)
shutil.move(final, js_target)
+ # TODO: use an async blob, which would allow code rewriting on the client:
+ # var blob = new Blob([codeString]);
+ # var script = document.createElement('script');
+ # script.src = URL.createObjectURL(blob);
+ # document.body.appendChild(script);
script_tag = '''<script async type="text/javascript" src="%s"></script>''' % base_js_target
html.write(shell.replace('{{{ SCRIPT }}}', script_tag))
else: