aboutsummaryrefslogtreecommitdiff
path: root/emcc
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2014-01-31 16:21:10 -0800
committerAlon Zakai <alonzakai@gmail.com>2014-01-31 16:21:10 -0800
commit53af8ab2ebc91488d53e27dd69f7c8b8901cbda5 (patch)
treead02c3d248145574331ed5f734a619e442d581ac /emcc
parent8a6bb8d78fd5deff52564c82bd6cb20475f9df77 (diff)
comment
Diffstat (limited to 'emcc')
-rwxr-xr-xemcc7
1 files changed, 6 insertions, 1 deletions
diff --git a/emcc b/emcc
index b483de12..d30966cd 100755
--- a/emcc
+++ b/emcc
@@ -2074,7 +2074,12 @@ try:
# Non-modifiable code, just load the code directly
script_tag = '''<script async type="text/javascript" src="%s"></script>''' % base_js_target
else:
- # Potentially-modifiable code, load as text, modify, then execute
+ # Potentially-modifiable code, load as text, modify, then execute. This lets you
+ # patch the code on the client machine right before it is executed, perhaps based
+ # on information about the client. For example,
+ # code = code.replace(/Math_fround\(/g, '(');
+ # could be used to remove Math.fround optimization (in an unminified build), if
+ # the client does not support Math.fround natively.
code = '''
// Load the code as text, and execute it asynchronously. This keeps everything
// async and responsive, while also making it possible to modify the code on