aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2014-01-04 16:34:06 -0800
committerAlon Zakai <alonzakai@gmail.com>2014-01-04 16:34:06 -0800
commit0895a9801ef922f4b0655d24eb1569092014eebe (patch)
treea0c231577d7d870b3bf36b320d6cf21ec21da3ed
parentddaac5fbe1c40c4c15bb7cf47ba03d4d4a4847e2 (diff)
todo about async script tags
-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: