aboutsummaryrefslogtreecommitdiff
path: root/javascript/olm_pre.js
diff options
context:
space:
mode:
Diffstat (limited to 'javascript/olm_pre.js')
-rw-r--r--javascript/olm_pre.js12
1 files changed, 10 insertions, 2 deletions
diff --git a/javascript/olm_pre.js b/javascript/olm_pre.js
index 611488b..ae7aba5 100644
--- a/javascript/olm_pre.js
+++ b/javascript/olm_pre.js
@@ -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];
+ }
+ }
+ }