diff options
author | Alon Zakai <alonzakai@gmail.com> | 2012-08-10 10:30:10 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2012-08-10 10:33:40 -0700 |
commit | 9998978f1bc0c0aafeac29dd7adf5b2b0b6e078e (patch) | |
tree | 07d5c987fca78667e42a66a885ae116da58fbef7 /src | |
parent | b3389d30aaf4fecb9749ebffa4577b140c570fde (diff) |
Module.preInit
Diffstat (limited to 'src')
-rw-r--r-- | src/postamble.js | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/postamble.js b/src/postamble.js index 2944e681..e1dd495a 100644 --- a/src/postamble.js +++ b/src/postamble.js @@ -79,6 +79,13 @@ Module['run'] = run; // {{PRE_RUN_ADDITIONS}} +if (Module['preInit']) { + if (typeof Module['preInit'] == 'function') Module['preInit'] = [Module['preInit']]; + while (Module['preInit'].length > 0) { + Module['preInit'].pop()(); + } +} + initRuntime(); #if INVOKE_RUN |