diff options
author | Alon Zakai <alonzakai@gmail.com> | 2014-01-31 16:21:10 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2014-01-31 16:21:10 -0800 |
commit | 53af8ab2ebc91488d53e27dd69f7c8b8901cbda5 (patch) | |
tree | ad02c3d248145574331ed5f734a619e442d581ac /emcc | |
parent | 8a6bb8d78fd5deff52564c82bd6cb20475f9df77 (diff) |
comment
Diffstat (limited to 'emcc')
-rwxr-xr-x | emcc | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -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 |