Skip to content
Snippets Groups Projects
Commit 51b141ec authored by Richard van der Hoff's avatar Richard van der Hoff
Browse files

Let apps override emscripten settings

Read settings from OLM_OPTIONS to allow apps to configure some options. In
particular, this is useful for setting the heap size.
parent 1bf807bf
No related branches found
No related tags found
No related merge requests found
...@@ -21,5 +21,13 @@ if (typeof(window) !== 'undefined') { ...@@ -21,5 +21,13 @@ if (typeof(window) !== 'undefined') {
} }
(function() { (function() {
var module; // Shadow the Node 'module' object so that emscripten won't try /* applications should define OLM_OPTIONS in the environment to override
// to fiddle with it. * emscripten module settings */
var Module = {};
if (typeof(OLM_OPTIONS) !== 'undefined') {
for (var key in OLM_OPTIONS) {
if (OLM_OPTIONS.hasOwnProperty(key)) {
Module[key] = OLM_OPTIONS[key];
}
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment