diff options
Diffstat (limited to 'src/library_browser.js')
-rw-r--r-- | src/library_browser.js | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/library_browser.js b/src/library_browser.js index 299e8a72..66aeeaf8 100644 --- a/src/library_browser.js +++ b/src/library_browser.js @@ -4,6 +4,8 @@ mergeInto(LibraryManager.library, { emscripten_set_main_loop: function(func, fps) { + Module['noExitRuntime'] = true; + fps = fps || 60; // TODO: use requestAnimationFrame _emscripten_set_main_loop.cancel = false; var jsFunc = FUNCTION_TABLE[func]; @@ -20,6 +22,8 @@ mergeInto(LibraryManager.library, { }, emscripten_async_call: function(func, millis) { + Module['noExitRuntime'] = true; + // TODO: cache these to avoid generating garbage setTimeout(function() { FUNCTION_TABLE[func](); |