diff options
author | David Baker <dave@matrix.org> | 2018-10-04 20:09:54 +0100 |
---|---|---|
committer | David Baker <dave@matrix.org> | 2018-10-04 20:09:54 +0100 |
commit | 602c00a8d658e8510e37e841dd06c70f276d0f00 (patch) | |
tree | 06ad0cb951a8c50e48325a7f75a58e83d4b3fc45 /javascript/olm_pre.js | |
parent | 00384ba87a5943a8a12c9b8bfcb8903cc9be490f (diff) |
Dual-build wasm and asm.js olm
Diffstat (limited to 'javascript/olm_pre.js')
-rw-r--r-- | javascript/olm_pre.js | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/javascript/olm_pre.js b/javascript/olm_pre.js index 4feff97..18d836d 100644 --- a/javascript/olm_pre.js +++ b/javascript/olm_pre.js @@ -37,3 +37,12 @@ if (typeof(OLM_OPTIONS) !== 'undefined') { * use UTF8ToString. */ var NULL_BYTE_PADDING_LENGTH = 1; + +Module['onRuntimeInitialized'] = function() { + OLM_ERROR = Module['_olm_error'](); + if (onInitSuccess) onInitSuccess(); +}; + +Module['onAbort'] = function(err) { + if (onInitFail) onInitFail(err); +}; |