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
......@@ -21,5 +21,13 @@ if (typeof(window) !== 'undefined') {
}
(function() {
var module; // Shadow the Node 'module' object so that emscripten won't try
// to fiddle with it.
/* applications should define OLM_OPTIONS in the environment to override
* 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];
}
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment